Plan Mode
For non-trivial tasks, the agent enters plan mode before writing any code. Instead of jumping straight into implementation, it first analyzes your project and presents a clear approach for your approval.
How it works
When you send a complex request, the agent:
- Explores your codebase — reads relevant files, checks existing patterns, understands the architecture.
- Designs an approach — identifies which files to create or modify, what the implementation steps are, and what trade-offs exist.
- Presents the plan — shows you a step-by-step breakdown of what it intends to do.
- Waits for your approval — you review the plan and can ask questions, suggest changes, or approve it before any code is written.
Why it matters
Plan mode prevents wasted effort. Instead of the agent writing hundreds of lines of code in the wrong direction, you see the approach upfront and can course-correct early.
This is especially useful when:
- There are multiple valid approaches (e.g., which library to use, where to put a component, how to structure the data model).
- The task touches many files across your project.
- You have specific preferences the agent might not guess on its own.
When it activates
You do not need to request plan mode explicitly. The agent activates it automatically when it judges that the task benefits from upfront planning.
For simple changes — fixing a typo, adding a single button, changing a color — the agent skips planning and acts directly. Plan mode is reserved for tasks where thinking first saves time.
What you can do during plan mode
While reviewing a plan, you can:
- Approve it to let the agent start executing.
- Ask questions about specific steps or trade-offs.
- Request changes to the approach before any code is written.
- Cancel it if you decide to go a different direction.
This makes the agent collaborative rather than autonomous — you set the direction, and the agent handles the implementation.