How Claude Code plan mode works, and which model plans
AutoRouter7 min read
Claude Code plan mode tells Claude to research a change and write a plan before it touches your source. In plan mode Claude reads files, runs shell commands to explore, and proposes an approach, and its edits stay blocked until you approve the plan, according to Anthropic's permission modes docs (checked October 26, 2026). The model that writes the plan is the session's model, unless you choose the opusplan alias or a tool such as AutoRouter, the Mac app for Codex and Claude Code, which picks a model for each turn while it is selected in /model.
AutoRouter wrote this post. Everything about Claude Code comes from Anthropic's documentation, linked where it is used.
What does plan mode do in Claude Code?
Plan mode is one of Claude Code's permission modes: Claude can read and explore, but it can't edit your files until you approve its plan. Anthropic's mode table lists plan mode as running reads without asking, plus shell commands that auto mode's classifier approves when auto mode is available, and recommends it for "exploring a codebase before changing it."
While Claude plans, it can hand codebase research to the built-in Plan subagent, a read-only research agent that keeps exploration output in its own context window, per the subagent docs. The status bar shows ⏸ plan mode on while plan mode is active.
How do you turn plan mode on and off?
Press Shift+Tab until the status bar shows ⏸ plan mode on, or start a single prompt with /plan. From auto mode, the first press switches to Manual mode, and the cycle then runs Manual, accept edits, plan, as the docs describe. To start a session in plan mode from the command line:
claude --permission-mode plan
Press Shift+Tab again to leave plan mode without approving a plan. To make plan mode the starting mode for every terminal session in a project, set permissions.defaultMode in the project's .claude/settings.json:
{
"permissions": {
"defaultMode": "plan"
}
}
The VS Code extension doesn't read project settings for its starting mode; set claudeCode.initialPermissionMode to plan in your VS Code user settings instead (docs).
What happens when you approve a plan?
Approving a plan ends plan mode and switches the session to the permission mode you chose, so Claude starts editing. When the plan is ready, Claude Code offers three choices:
- Yes, and use auto mode: approve and continue in auto mode. It reads Yes, auto-accept edits when auto mode isn't available to your session.
- Yes, manually approve edits: approve and review each edit yourself.
- No, keep planning: stay in plan mode and tell Claude what to change.
Press Ctrl+G to open the plan in your text editor and change it before Claude proceeds. With the showClearContextOnPlanAccept setting on, the list gains a first option that approves the plan and clears the planning context. To plan again later, cycle back with Shift+Tab or start the next prompt with /plan.
Which model writes the plan?
The plan comes from whatever model the session is on, so a session on Sonnet plans on Sonnet. Two settings change that. The opusplan alias "uses opus during plan mode, then switches to sonnet for execution," according to the model configuration docs. And the same docs describe a Haiku session as normally upgrading to Sonnet while in plan mode.
| Setup | Model that plans | Model that builds | How to set it |
|---|---|---|---|
| Plan mode on its own | The session's model | The session's model | Shift+Tab or /plan |
opusplan | Opus (ANTHROPIC_DEFAULT_OPUS_MODEL if set) | Sonnet (ANTHROPIC_DEFAULT_SONNET_MODEL if set) | /model opusplan or claude --model opusplan |
| Plan subagent | Inherits the main conversation's model | Not used for building | CLAUDE_CODE_SUBAGENT_MODEL with CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1 |
AutoRouter selected in /model | Picked for each turn: your rules first, then the turn's difficulty | Picked for each turn the same way | Choose AutoRouter with /model |
Every switch between models has a cost of its own. Each model keeps its own prompt cache, so the first request after a switch "reads the entire conversation history with no cache hits," per the prompt caching docs. With opusplan, each move in or out of plan mode is a model switch. Every way to choose a model in Claude Code covers the other model settings.
Does plan mode save usage?
Plan mode can save usage by catching a wrong direction before Claude writes code. Anthropic's cost guide lists plan mode for complex tasks as a way of "preventing expensive re-work when the initial direction is wrong." Planning still uses tokens: Claude reads files and runs commands to write the plan, and those requests count toward your plan's limits like any other.
Plan mode multiplies with agent teams. The same guide says agent teams use about seven times more tokens than standard sessions when teammates run in plan mode, because each teammate keeps its own context window (costs).
For quick, clear changes, planning first mostly adds turns. Plan mode pays off on work that spans several files or where the approach is open. How Claude Code usage limits work covers what else uses up a plan fastest.
How does AutoRouter handle planning and building?
AutoRouter picks a model for each turn while it is the model selected in Claude Code's /model picker, so planning and building turns can go to different models without a fixed split. Your own rules decide a turn first. Otherwise AutoRouter works out how hard the turn is, only considers models that clear the quality bar for it, sends hard work to the most capable model your plans cover, and sends everything else to the model that costs you least.
AutoRouter's own examples show the spread (illustrations; real routes follow your plans and rules): a change across six files goes to Claude Opus 5.5 on the Claude plan, and a commit message is quick work, so a low-cost open model writes it and the plan isn't touched. In Claude Code, Claude models run on your Claude plan, and every turn shows its model, what it cost and why.
You can steer it with rules written in plain English, such as "Use Claude Opus 5.5 for UI work," which come before AutoRouter's own. Picking opusplan or any other model in /model sends turns straight to it, because AutoRouter routes only while it is the model selected. How AutoRouter picks a model for each turn walks through the full order. AutoRouter is in beta and runs on macOS 14 or later; Claude Code needs Node 22.18 or later.
Questions
Can Claude run commands in plan mode?
Yes, for exploring. When auto mode is available and the useAutoModeDuringPlan setting is on, which it is by default, a classifier reviews shell commands and runs the ones it approves. Without auto mode, commands outside Claude Code's built-in read-only set ask for your approval (docs).
What happened to Ultraplan?
Anthropic removed the Ultraplan research preview, including the /ultraplan command. Its notice points to plan mode for local planning and to Claude Code in the cloud for planning and reviewing in a browser.
Can I edit the plan before Claude starts?
Yes. Press Ctrl+G at the approval prompt to open the plan in your default text editor, change it, and let Claude proceed from your version. You can also choose No, keep planning and tell Claude what to change.
Does approving a plan give the session a name?
Yes. Accepting a plan gives the session a generated title based on the plan, unless you have already named the session, according to the permission modes docs.
Does opusplan work with AutoRouter?
Choosing opusplan in /model replaces AutoRouter as the selected model, so turns go to Opus and Sonnet as opusplan decides. Pick AutoRouter again with /model to go back to a model chosen for each turn.
Sources
- Choose a permission mode, checked October 26, 2026
- Model configuration, checked October 26, 2026
- Create custom subagents, checked October 26, 2026
- Manage costs effectively, checked October 26, 2026
- Prompt caching, checked October 26, 2026
- Common workflows, checked October 26, 2026
- Ultraplan is no longer available, checked October 26, 2026