Skip to main content
The /plan command turns a single prompt into a structured, multi-task plan. You create the plan, start it, and watch each task complete in real time. Check progress with /plan status, or stop with /plan cancel.

Lifecycle

  1. Create/plan <prompt> asks the agent to break your request into tasks.
  2. Run/plan run starts execution. The agent works through tasks one by one.
  3. Observe — Each task’s completion is emitted as an event in the stream and persisted to the thread.
  4. Finish — When every task is done, the plan reaches completed. A stuck task may go blocked or failed.

Create and run the plan

PlanState

TaskRecord

Approving a plan

In swarm mode, a plan may reach awaiting_approval before it can run. Approve or reject it with sdk.agent.decide(). A changes_requested decision sends feedback back so the agent can revise the plan.