# How Claude Code plan mode works, and which model plans

Authors: AutoRouter
Published: 2026-10-27T01:40:00.000Z
Reading time: 7 min
Canonical: https://autorouter.com/blog/claude-code-plan-mode
Publisher: AutoRouter, the Mac app for Codex and Claude Code (https://autorouter.com)

> Claude Code plan mode has Claude read your code and propose a plan without editing any files until you approve it. Turn it on with Shift+Tab, by starting a prompt with /plan, or with claude --permission-mode plan. Planning runs on your session's model unless you pick opusplan, which plans on Opus and builds on Sonnet; AutoRouter, the Mac app for Codex and Claude Code, instead picks a model for each turn while it is selected.

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](https://code.claude.com/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) (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](https://autorouter.com), 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](https://code.claude.com/docs/en/permission-modes#available-modes) 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](https://code.claude.com/docs/en/sub-agents#built-in-subagents). 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](https://code.claude.com/docs/en/permission-modes#switch-permission-modes). To start a session in plan mode from the command line:

```bash
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`:

```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](https://code.claude.com/docs/en/permission-modes#set-plan-mode-as-the-default)).

## 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](https://code.claude.com/docs/en/permission-modes#review-and-approve-a-plan):

- **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](https://code.claude.com/docs/en/model-config#opusplan-model-setting). 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](https://code.claude.com/docs/en/prompt-caching#switching-models). With `opusplan`, each move in or out of plan mode is a model switch. [Every way to choose a model in Claude Code](/blog/claude-code-model-settings) 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](https://code.claude.com/docs/en/costs) 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](https://code.claude.com/docs/en/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](/blog/claude-code-usage-limits) 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](/blog/how-autorouter-picks-a-model) 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](https://code.claude.com/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode)).

### What happened to Ultraplan?

Anthropic removed the Ultraplan research preview, including the `/ultraplan` command. [Its notice](https://code.claude.com/docs/en/ultraplan) 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](https://code.claude.com/docs/en/permission-modes), checked October 26, 2026
- [Model configuration](https://code.claude.com/docs/en/model-config), checked October 26, 2026
- [Create custom subagents](https://code.claude.com/docs/en/sub-agents), checked October 26, 2026
- [Manage costs effectively](https://code.claude.com/docs/en/costs), checked October 26, 2026
- [Prompt caching](https://code.claude.com/docs/en/prompt-caching), checked October 26, 2026
- [Common workflows](https://code.claude.com/docs/en/common-workflows), checked October 26, 2026
- [Ultraplan is no longer available](https://code.claude.com/docs/en/ultraplan), checked October 26, 2026

## Read next

- [How to run multiple agents in Claude Code](https://autorouter.com/blog/claude-code-multi-agent.md): Claude Code runs multi-agent work in two ways inside a session: subagents, which work in their own context and report back to the main conversation, and agent teams, an experimental mode where a lead session coordinates teammates that share a task list and message each other. Every agent's requests count toward the same usage limits, so the model each agent runs on is the main cost lever. AutoRouter, the Mac app for Codex and Claude Code, picks a model for each turn in the main conversation.
- [Try a new model in Codex or Claude Code without another API key](https://autorouter.com/blog/try-new-models-in-codex-and-claude-code.md): Every manual way to try a new model in Codex or Claude Code needs an API key: one per provider, or one gateway key such as OpenRouter's. Claude Code reaches another provider through environment variables, and Codex through a custom provider in config.toml. AutoRouter, the Mac app for Codex and Claude Code, adds 20+ models to both apps' model pickers with no keys or endpoints to set up, and new models show up there right away.
- [Every way to choose a model in Claude Code](https://autorouter.com/blog/claude-code-model-settings.md): Claude Code takes its model from, in order of priority, the /model command, the --model flag, the ANTHROPIC_MODEL environment variable, the model key in settings.json and the ANTHROPIC_DEFAULT_MODEL variable. Aliases such as opus, sonnet, haiku, fable and opusplan stand for the current model in each family, and subagents take their model from their own model field, CLAUDE_CODE_SUBAGENT_MODEL or the main session. AutoRouter, the Mac app for Codex and Claude Code, adds one more choice to /model that picks a model for each turn while it is selected.

Tags: [Claude Code](https://autorouter.com/blog/tags/claude-code.md), [Models](https://autorouter.com/blog/tags/models.md), [Guides](https://autorouter.com/blog/tags/guides.md)

Drafted with AI from the sources linked above, then checked and edited by the AutoRouter team.
