WO Status Transitions
Benchmarked against: Anthropic โ Handling stop reasons System: WO System v4.0 (Captain-approved, 2026-03-01) Enforcement: State machine with transition gates + RBAC
Every work order follows a strict state machine. Invalid transitions are rejected by the system. Some transitions require specific fields to be filled before they are allowed.
State machineโ
Status definitionsโ
| Status | Icon | Meaning | Who triggers |
|---|---|---|---|
pending | ๐ด | WO created, awaiting assignee acceptance | System (on create) |
accepted | ๐ก | Assignee acknowledged, will begin work | Assignee |
in_progress | ๐ต | Work actively being done | Assignee |
blocked | โซ | Cannot proceed, waiting on external dependency | Assignee |
review | ๐ฃ | Work completed, submitted for Captain review | Assignee |
approved | ๐ข | Captain verified and approved | Captain only |
rejected | ๐ด | Captain reviewed and returned for revision | Captain only |
cancelled | โฌ | WO abandoned | Captain only |
Transition gatesโ
Some transitions require specific fields. The system enforces these gates โ attempting a transition without required fields returns an error with missing_fields hint.
| Transition | Required fields | Why |
|---|---|---|
in_progress โ review | completion_summary + actual_hours (> 0) | Can't review without knowing what was done |
in_progress โ blocked | notes | Must explain what's blocking |
blocked โ in_progress | notes | Must explain what unblocked |
review โ approved | review_notes | Captain must document what was verified |
review โ rejected | review_notes | Captain must explain why rejected |
any โ cancelled | notes | Must explain why cancelled |
Example: submitting for reviewโ
# This will FAIL โ missing required fields
complete_work_order(
order_id="WO-2026-0305-001",
summary="" # Empty summary
)
# Error: {"error": "missing_fields", "hint": ["completion_summary", "actual_hours"]}
# This will SUCCEED
complete_work_order(
order_id="WO-2026-0305-001",
summary="Deployed Text Subgraph. 327 entries processed, 94% accuracy.",
actual_hours=3.5
)
RBAC (Role-Based Access Control)โ
Not all users can trigger all transitions:
| Role | Identities | Allowed transitions |
|---|---|---|
| Captain | ๅคๅฅ, ๅฐ่ฅฟ, system:captain-proxy | All transitions including approve/reject/cancel |
| Assignee | The agent assigned to the WO | accept, start, block, unblock, submit for review |
| Other agents | Any non-assigned agent | View only โ cannot change status |
Captain-only actionsโ
These transitions can only be performed by Captain identities:
reviewโapproved(verify_work_order with approved=True)reviewโrejected(verify_work_order with approved=False)- any โ
cancelled(requires notes)
Attempting these as a non-Captain returns a permission error.
Valid transitions tableโ
| From โ / To โ | pending | accepted | in_progress | blocked | review | approved | rejected | cancelled |
|---|---|---|---|---|---|---|---|---|
| pending | โ | โ | โ | โ | โ | โ | โ | โ Captain |
| accepted | โ | โ | โ | โ | โ | โ | โ | โ Captain |
| in_progress | โ | โ | โ | โ notes | โ summary+hours | โ | โ | โ Captain |
| blocked | โ | โ | โ notes | โ | โ | โ | โ | โ Captain |
| review | โ | โ | โ | โ | โ | โ Captain | โ Captain | โ Captain |
| rejected | โ | โ | โ | โ | โ | โ | โ | โ Captain |
| approved | โ | โ | โ | โ | โ | โ | โ | โ (terminal) |
| cancelled | โ | โ | โ | โ | โ | โ | โ | โ (terminal) |
Transition historyโ
Every WO maintains a complete transition history โ an audit trail of every state change:
{
"transition_history": [
{
"from_status": "pending",
"to_status": "accepted",
"changed_by": "Mac CLI ๅฐๅ
",
"timestamp": "2026-03-05T09:35:00Z",
"notes": null
},
{
"from_status": "accepted",
"to_status": "in_progress",
"changed_by": "Mac CLI ๅฐๅ
",
"timestamp": "2026-03-05T09:36:00Z",
"notes": "Starting implementation"
},
{
"from_status": "in_progress",
"to_status": "review",
"changed_by": "Mac CLI ๅฐๅ
",
"timestamp": "2026-03-05T13:00:00Z",
"notes": null,
"completion_summary": "Deployed successfully, 94% accuracy",
"actual_hours": 3.5
}
]
}
Access via get_work_order_detail(order_id) โ always returns the full history.
Common patternsโ
Happy pathโ
pending โ accepted โ in_progress โ review โ approved โ
The standard flow: Captain creates, agent accepts, works on it, submits for review, Captain approves.
Blocked and unblockedโ
in_progress โ blocked (notes: "Waiting for SS2 setup")
โ in_progress (notes: "SS2 online, resuming")
โ review โ approved โ
Agent hits a dependency, blocks the WO with explanation, resumes when unblocked.
Rejected and revisedโ
in_progress โ review โ rejected (review_notes: "Accuracy below 90%")
โ in_progress (fix issues)
โ review โ approved โ
Captain rejects, agent fixes, resubmits. The full cycle is visible in transition history.
Cancelledโ
pending โ cancelled (notes: "Requirements changed, no longer needed")
Captain-only action. The WO is permanently closed.
Related pagesโ
| Page | Relationship |
|---|---|
| Work Order API | Full API reference for WO tools |
| HITL/HOTL | Decision boundaries โ when Captain review is required |
| Company Constitution | ยง3 โ WOs as the only task channel |
| Dispatch Engine | Execute WOs with different AI engines |