Plan Mode
With permission_mode="plan", the agent proposes a plan and waits for your approval before executing anything. Approve it, or ask for a revision. It is one of the three human-in-the-loop mechanisms.
Approve a plan
Plan approval arrives as an AskUserQuestion titled Plan Approval. Use req.is_plan_approval and req.plan_text to detect and display it:
After approval, execution continues with approval-style checks for non-safe tools. Plan approvals never auto-continue: the run waits for a decision. See examples/plan-mode.py for a complete interactive example.
Embed plan approval in your product (polling flow)
Fetch the plan text and show it to your user before answering:
Prefer webhooks over polling in production: subscribe to run.awaiting_input and answer from your UI. See Human-in-the-Loop.
Next: Human-in-the-Loop · Runs
