Claude Code Plan Mode: How to Enter It, When to Use It, and How opusplan Cuts Cost
Claude Code plan mode is a read-only permission mode: Claude can read your code, search, and analyze, then write an implementation plan, but it does not edit any source file until you approve that plan. As of 2026-11-25 (Claude Code 2.1.33x), the quickest ways in are pressing Shift+Tab in the prompt box until the status bar shows plan mode, or launching with claude --permission-mode plan. Pair it with the built-in opusplan model alias and Opus 5.5 does the planning while Sonnet 5.5 does the typing, so your daily budget goes to the step that needs the most reasoning.
QCode is an independent third-party API service and is not affiliated with Anthropic. Claude Code behavior in this article follows Anthropic's documentation at code.claude.com; QCode settings follow docs.qcode.cc.
Updated 2026-11-26
Key facts
- Plan mode is read-only. Reading files, Grep/Glob search, Git history analysis, web search and read-only MCP tools are allowed. Creating or editing files, installing packages and running builds are blocked.
- There are five ways in:
Shift+Tab, a/planprefix on one prompt, the--permission-mode planflag,permissions.defaultMode: "plan"insettings.json, and the VS Code settingclaudeCode.initialPermissionMode. - When the plan is ready you can approve and run in auto mode, approve and review each edit, or keep planning.
Ctrl+Gopens the plan in your editor. opusplanis an official Claude Code model alias: it usesopusin plan mode and switches tosonnetfor execution.- At QCode's /models prices (read 2026-11-22), Opus 5.5 is $4 / $20 per million tokens and Sonnet 5.5 is $2 / $10, so moving execution to Sonnet halves the output rate.
What plan mode does and does not do
The costly failure in agentic coding is rarely a weak model. It is a model that misreads the task and starts editing. Twelve files later you notice the direction is wrong, run git checkout, and the tokens are gone. Plan mode separates thinking from doing.
In plan mode Claude can:
- read any file in the project and search symbols and call sites with Grep and Glob;
- walk the Git history to see who changed a block of code and why;
- run shell commands to explore (whether you are asked first depends on auto mode, see below);
- call read-only MCP tools and search the web;
- send subagents off for deeper research.
It will not create or modify source files, install dependencies, run commands with side effects, or run builds and tests. The output is a plan: which files change, what each step does, and which risks or open questions remain.
Anthropic's docs describe three cases for shell commands during planning. If auto mode is available and useAutoModeDuringPlan is on (the default), the auto-mode classifier reviews commands and approved ones run. If auto mode is unavailable or that setting is off, anything outside the built-in read-only set prompts you. If the session started with bypass permissions, plan mode's edit blocks are not enforced and Claude is only instructed not to edit. If you want planning to be truly read-only, do not plan in bypass mode.
How to enter and exit plan mode
| Method | How | Best for |
|---|---|---|
| Shortcut | Press Shift+Tab in the prompt box until the status bar shows ⏸ plan mode on |
Switching mid-session |
| One prompt | Prefix with /plan, e.g. /plan split the auth module into its own package |
Planning a single task only |
| Launch flag | claude --permission-mode plan |
Starting in plan mode; also works with -p |
| Project default | permissions.defaultMode set to plan in .claude/settings.json |
Repos where the team plans first |
| VS Code | User setting claudeCode.initialPermissionMode set to plan |
VS Code sessions, which ignore the project's starting mode |
Shift+Tab cycles through the permission modes. How many presses it takes depends on your starting mode and which optional modes (auto, bypassPermissions) are enabled, so watch the status bar rather than counting. Writing "make a plan first, don't touch the code" in a prompt does not switch modes. Claude is asked to hold back, but nothing at the permission layer stops it.
Project-level default:
{
"permissions": {
"defaultMode": "plan"
}
}
To leave without approving, press Shift+Tab again. Approving a plan exits plan mode into the mode the chosen option names. /clear wipes the conversation and the plan with it; switching modes alone keeps the context.
The approval options
When the plan is ready, Claude Code offers (wording may vary by version):
- Yes, and use auto mode: approve and execute in auto mode. If auto mode is not available to the session, this reads as auto-accept edits.
- Yes, manually approve edits: approve, then review each edit.
- No, keep planning: stay in plan mode and say what to change.
With showClearContextOnPlanAccept enabled, a first option appears that approves the plan and clears the planning context, which helps after a long exploration has filled the window. Press Ctrl+G to open the plan in your default editor, change it, save, and Claude works from your version. The current session's plan files live in ~/.claude/plans/ unless you set plansDirectory.
When to use plan mode
Good fits:
- Multi-file refactors and new features. Before pulling payment logic out of a monolith, have Claude list every call site and the migration order.
- Unfamiliar codebases. Ask for the architecture, entry points and data flow before deciding where to change things.
- Production bug hunts. Read logs, code and recent commits read-only, confirm the root cause, then fix.
- Risky changes. Database migrations, major dependency upgrades, auth and permission code.
- Plans that need review. Paste the plan into a PR description or send it to a teammate to agree on direction first.
Poor fits: a typo, one more log line, or a precise change to a single function. Planning reads files and searches, and that input costs tokens too. For small tasks, just do them.
Three practical workflows
1. Big refactor, planned once and executed in batches. Enter plan mode and ask for output in "step + files + risk" form. While reviewing, press Ctrl+G to drop steps you don't want, choose manual edit approval, and go step by step. If the context is getting full before execution, run /compact keep the full execution plan and impact analysis, compress the exploration.
2. Bug investigation. Use the /plan prefix for just this task: /plan users report garbled Chinese characters in CSV exports; find the cause and propose a fix. Claude reads the relevant code, returns a root cause and a fix, and you decide whether to run it.
3. Plans only, from CI or a script. Plan mode combines with non-interactive -p, so you get a proposal without code changes:
claude -p --permission-mode plan "Read the code under src/ and list the files and steps needed to migrate the REST endpoints to gRPC"
Post the output to an issue or PR comment for human review.
Plan with a strong model, execute with a cheaper one: opusplan
Planning needs reasoning and a whole-codebase view. Execution is mostly methodical code writing. Claude Code ships a model alias for exactly this split: opusplan uses opus in plan mode and switches to sonnet automatically for execution. On the Anthropic API those aliases resolve to Opus 5.5 and Sonnet 5.5 as of 2026-11-25. Both already have a native 1M-token window, so opusplan[1m] adds nothing for them.
When you use Claude Code through QCode, pin the aliases to explicit model IDs so a version change never surprises you:
# macOS / Linux / WSL
export ANTHROPIC_BASE_URL=https://api.qcode.cc/api
export ANTHROPIC_AUTH_TOKEN=cr_your_key
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5
claude --model opusplan --permission-mode plan
Or make it permanent in ~/.claude/settings.json:
{
"model": "opusplan",
"env": {
"ANTHROPIC_BASE_URL": "https://api.qcode.cc/api",
"ANTHROPIC_AUTH_TOKEN": "cr_your_key",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5"
}
}
You can also switch mid-session with /model opusplan. In the /model picker, Enter saves the choice as the default for new sessions and s applies it to this session only.
To plan with the stronger Fable 5.2 (claude-fable-5-2, $8 / $40 per million tokens as of 2026-11-26), switch by hand: /model claude-fable-5-2 while planning, then /model sonnet before you approve. It is more flexible, but if you forget to switch back, execution is billed at Fable rates.
One detail matters for cost: prompt caches are per model. After the switch from Opus to Sonnet, the first Sonnet request writes the context to cache again, which is a one-off cache-write charge. The longer the planning phase, the larger that switch cost, though it is usually far smaller than the output savings during execution.
The cost math on a daily-quota plan
QCode bills at the official price times a service multiplier, currently ×1.0 for Anthropic models as of 2026-11-26; check /models for live prices. Here is an illustrative estimate, not a measurement, for a mid-sized refactor:
- Planning: 40K uncached input tokens, 160K cache-read tokens, 8K output tokens.
- Execution: 200K uncached input tokens, 1.3M cache-read tokens, 60K output tokens.
| Setup | Planning | Execution | Total | Tasks per $35 day |
|---|---|---|---|---|
| Opus 5.5 throughout | $0.35 | $2.26 | ≈ $2.61 | ≈ 13 |
| opusplan (Opus plans, Sonnet executes) | $0.35 | $1.13 | ≈ $1.48 | ≈ 23 |
| Sonnet 5.5 throughout | $0.18 | $1.13 | ≈ $1.31 | ≈ 26 |
(Illustrative assumptions per million tokens: Opus 5.5 $4 input, $0.20 cache read, $20 output; Sonnet 5.5 $2 input, $0.10 cache read, $10 output, with cache reads assumed at 5% of the input rate. Cache writes and re-caching after the model switch are excluded.)
Two things stand out. Execution is where the money goes, so putting execution on Sonnet is the most direct saving. And planning itself is cheap; what it really saves is the cost of doing the work twice when the first direction is wrong. That part doesn't fit in a formula, but anyone who has unwound a bad refactor knows it. Run /cost at the end of a task to see the session's actual spend and compare setups.
A second, easy-to-miss cost is the auto-mode classifier. If auto mode is enabled for your session, shell commands during planning may be reviewed by the classifier, which is a model call. If exact usage accounting matters to you, test a small session first; to cut these calls, plan in a mode that doesn't use the classifier.
Troubleshooting
- Shift+Tab never reaches plan: make sure the prompt box has focus. Some terminals and remote sessions swallow the key combination; use the
/planprefix or launch with--permission-mode plan. - Claude still ran a command in plan mode: check whether the session started with bypass permissions, or whether the command was a read-only exploration the auto classifier approved.
- opusplan still shows Opus during execution: confirm you approved the plan and left plan mode; check the model with
/statusor/model; make sureANTHROPIC_DEFAULT_SONNET_MODELisn't set to an Opus ID. - The plan disappeared:
/clearwas run. Save the plan withCtrl+Gfirst, or agree in CLAUDE.md that plans are written to a project doc. - 401 errors: usually a wrong key, or
ANTHROPIC_API_KEYset alongsideANTHROPIC_AUTH_TOKEN. See our custom base URL 401 guide.
FAQ
How do I turn on plan mode in Claude Code?
Press Shift+Tab in an interactive session until the status bar shows plan mode on. You can also prefix a single prompt with /plan or start with claude --permission-mode plan. For a project-wide default, set permissions.defaultMode to plan in .claude/settings.json.
Will plan mode change my code?
No. Until you approve the plan, file creation, edits and commands with side effects are blocked. The exception is a session started with bypass permissions, where edit blocks aren't enforced, so don't plan in bypass mode.
What is opusplan and does it cost extra?
opusplan is a built-in Claude Code model alias that uses Opus in plan mode and Sonnet for execution. The alias itself is free; you pay for the models it calls, at Opus rates while planning and Sonnet rates while executing.
Can I use opusplan through QCode?
Yes. Set ANTHROPIC_BASE_URL=https://api.qcode.cc/api and ANTHROPIC_AUTH_TOKEN, then use /model opusplan or --model opusplan. Also set ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5 and ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5 to pin the aliases.
Can I edit the plan before Claude runs it?
Yes. Press Ctrl+G before approving to open the plan in your default editor; save your changes and Claude follows the edited version. Or choose "keep planning" and describe the change.
Does plan mode make Claude Code more expensive?
Planning uses some input tokens for reading and searching, usually a small share of the whole task. It pays for itself by avoiding rework, and with opusplan putting execution on Sonnet, the total is usually lower than running Opus throughout.
How do I start in plan mode in the VS Code extension?
VS Code sessions don't read the starting mode from project settings. Set claudeCode.initialPermissionMode to plan in your VS Code user settings.
Run plan-then-execute on a daily budget
If you use Claude Code every day for medium and large changes, QCode's Daily-35 plan fits: $35 of official-price API usage per day for 30 days at $53.57, with the quota resetting at 00:00 Beijing time. By the illustrative estimate above, that covers roughly twenty mid-sized tasks a day with opusplan; your real usage will vary. One key works for Claude (Anthropic protocol) and GPT (OpenAI protocol), billed at official price ×1.0. See /pricing for all tiers, or /pay-as-you-go packs for occasional use.