Next work
next_workRe-evaluate the dependency graph, budget, and policy to claim the next work: execute, wait for in-flight units, plan, or stop when complete or blocked.
Instructions
Re-evaluate the graph, budget and policy and claim the next work. action "execute" = do the dispatched units (direct, or parallel with subagents when justified); "wait" = finish in-flight units first; "plan" = analysis/graph needed; "stop" = the run is over (budget spent, waiting for human, blocked, or completed). Call after every report_work. Only "stop" ends an OUTSIDE_MODE run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | Session handle returned by start_session. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| state | Yes | ||
| action | Yes | ||
| budget | Yes | ||
| dispatch | No | ||
| guidance | Yes | ||
| inFlight | Yes | ||
| sessionId | Yes | ||
| stopReason | No | ||
| openDecisions | Yes |