Plan Mode
May 8, 2026 ยท View on GitHub
Plan mode keeps the agent in a read-only planning posture. Use it for discovery, architecture review, and implementation planning before allowing writes or commands.
Enable Plan Mode
let mut sdk = AutohandSdk::new(Config::from_env().with_cwd("."));
sdk.start().await?;
sdk.set_plan_mode(true).await?;
Two-Phase Workflow
- Start in plan mode.
- Ask the agent to inspect and produce a plan.
- Stop and review the plan.
- Disable plan mode for the approved implementation.
- Handle permissions explicitly during execution.
sdk.set_plan_mode(true).await?;
// discovery prompt
sdk.set_plan_mode(false).await?;
// implementation prompt
Plan mode and permission mode are separate. Plan mode controls which tools are available; permission mode controls whether individual tool calls require approval.