Plan Mode
Plan Mode enables a structured planning workflow where the agent creates a plan and waits for user approval before executing.
How It Works
User requests a complex task
The agent determines the task requires planning (multiple steps, significant changes).
Agent creates a plan
A structured plan is generated with numbered steps, estimated actions, and any risks.
Plan is presented for approval
The plan is displayed in a modal in the web dashboard, or as a formatted message in other channels.
User approves or modifies
The user can approve the plan, request changes, or reject it entirely.
Agent executes
Once approved, the agent executes the plan step by step, reporting progress.
Dashboard Integration
In the web dashboard, Plan Mode uses a dedicated modal:
- Plan display — Formatted markdown with steps
- Approve button — Green button to approve and start execution
- Reject button — Red button to cancel
- Modify — Text input to request changes
WebSocket Protocol
Plan Mode uses WebSocket messages:
// Agent sends plan for approval{"type": "plan_created", "plan": "## Plan\n1. Step one\n2. Step two"}
// User approves{"type": "plan_response", "action": "approve"}
// User rejects{"type": "plan_response", "action": "reject", "reason": "Too risky"}
// User requests modification{"type": "plan_response", "action": "modify", "feedback": "Add error handling"}When Plan Mode Activates
Plan Mode is triggered for tasks that:
- Involve multiple file modifications
- Require irreversible system changes
- Include complex multi-step workflows
- The agent determines would benefit from user review
Use Cases
- Refactoring code — Review planned changes before execution
- System administration — Approve infrastructure changes
- Multi-file edits — Verify scope before modifying many files
- Research workflows — Approve the research strategy
Was this page helpful?