Claude Code plan mode: how to use it and what it blocks
Enter plan mode with Shift+Tab, /plan or --permission-mode plan, what Claude can run while planning, the approve options, opusplan, and plan mode in claude -p.
Plan mode is the Claude Code permission mode in which Claude reads your code, runs exploring commands and writes a plan, but cannot edit your source until you approve that plan. Press Shift+Tab until the status bar shows ⏸ plan mode on, start a single prompt with /plan, or launch with claude --permission-mode plan. When the plan is ready you choose Yes, and use auto mode, Yes, manually approve edits or No, keep planning; approving leaves plan mode and Claude starts editing in the mode you picked. To make it the default for a project, set "defaultMode": "plan" under permissions in .claude/settings.json. One catch: if you started the session with bypass permissions available, plan mode’s block on edits is not enforced in the terminal.
Getting in and out
Per Anthropic’s permission modes page (Claude Code 2.1.330, November 2026), there are four ways in:
Shift+Tabin a session. The cycle runs Manual (default) →acceptEdits→plan, then any optional modes you have enabled. If you are in auto mode, the first press drops you to Manual, so from auto it is three presses./planbefore one prompt, as in/plan add rate limiting to the login route, which enters plan mode with that request.- At startup:
claude --permission-mode plan. - As the default: in a project’s
.claude/settings.json, or in~/.claude/settings.jsonfor every project:
{
"permissions": {
"defaultMode": "plan"
}
}CopiedTo leave without approving anything, press Shift+Tab again while no approval prompt is open. If the plan prompt is showing, press Esc first: at that prompt, Shift+Tab approves the plan.
Elsewhere: the VS Code extension does not read the project’s defaultMode for its chat panel, so set claudeCode.initialPermissionMode to plan in your VS Code user settings, or pick Plan from the mode indicator under the prompt box, which applies to that conversation only.
What Claude can and can’t do while planning
Reading files in your working directories and the built-in read-only shell commands (ls and the like) run without asking. Edits to your source are held back. What happens to any other shell command depends on the session, and the first case that matches applies:
| Your session | A non-read-only command during planning |
|---|---|
Auto mode is available to your session, and useAutoModeDuringPlan is left on (the default) | Auto mode’s classifier reviews it and runs or blocks it, with no prompt. Web fetches, web searches and read-only MCP tools go through the same review. |
Auto mode unavailable, or useAutoModeDuringPlan set to false in user, local or managed settings | You are prompted, even if the sandbox is on in auto-allow mode. |
An interactive terminal session started with bypass permissions available | It runs without the classifier or a prompt, and so does any file edit Claude attempts. |
The last row is the one to know. If you launched with --dangerously-skip-permissions, --allow-dangerously-skip-permissions or a bypassPermissions default, Claude is still told to plan without editing, but nothing stops it if it tries; only your ask rules and recognised deletions of critical paths such as your home folder still prompt. Anthropic is explicit that plan mode keeps its blocks everywhere else: in claude -p runs, Agent SDK sessions and the VS Code chat panel. The bypass flags, auto mode and what each still stops are compared in Claude Code and Codex without permission prompts.
Subagents do not get around the plan. The Agent SDK permissions page says a subagent you define with permissionMode: "acceptEdits" still runs in plan mode when the main session is in it, “so that handing work to one doesn’t get around reviewing the plan first.” That makes plan mode a good fit for sending subagents off to explore a large codebase while you wait for one plan. Claude does write files of its own while planning: the plan itself, which goes to ~/.claude/plans/ unless you set plansDirectory.
Approving the plan, and the mode you land in
When Claude presents the plan you get three choices:
- Yes, and use auto mode: approve and continue in auto mode, where the classifier reviews each action instead of you. If auto mode isn’t available to you (an organization can turn it off), this option reads Yes, auto-accept edits and lands you in
acceptEdits. In a session started with bypass enabled, it reads Yes, and switch to BYPASS PERMISSIONS (no further prompts) for this session. - Yes, manually approve edits: approve and review every edit as Claude makes it.
- No, keep planning: stay in plan mode and tell Claude what to change.
Before choosing, Ctrl+G opens the plan in your text editor so you can rewrite it directly. With showClearContextOnPlanAccept turned on, a fourth option appears first that approves the plan and clears the planning conversation, so execution starts with the plan and not every file Claude read to make it. Approval is a one-way door: to plan the next change, press Shift+Tab back round to plan mode or start the prompt with /plan.
Plans are better when Claude already knows the project’s conventions and the commands that check its work, which is what a CLAUDE.md file is for.
opusplan: plan on Opus, build on Sonnet
The model configuration page still lists the opusplan alias: “Special mode that uses opus during plan mode, then switches to sonnet for execution.” As of Claude Code 2.1.330 on the Anthropic API those aliases resolve to Opus 5.5 and Sonnet 5.5. Select it with /model opusplan, claude --model opusplan, the model setting, or ANTHROPIC_MODEL=opusplan.
Since Pro, Max, Ultra, Team, Enterprise and API accounts already default to Opus 5.5, choosing opusplan mostly changes the building half: once you approve, the edits run on Sonnet instead of Opus. Points that trip people up:
opusplan[1m]asks for the 1M-token context window where the models don’t have it by default; setting it through/modelneeds Claude Code 2.1.265 or later.ANTHROPIC_DEFAULT_OPUS_MODELsets the modelopusplanplans on andANTHROPIC_DEFAULT_SONNET_MODELthe one it builds on, which is how you pin both on Bedrock, Google Cloud or Foundry.- An
availableModelsallowlist that excludes every Opus keeps planning on Sonnet. - The
haikualias also moves up for planning: the docs describe a Haiku session upgrading to Sonnet in plan mode, and since 2.1.329/statusnames the model either alias is planning on.
Plan mode from a script
claude -p accepts --permission-mode plan like any other mode, and the block on edits holds there with no exception. That makes it a safe way to get an analysis or a proposed change out of a scheduled job without letting it touch the tree. Using the non-interactive mode page’s JSON output, a two-step version that keeps a person or a check between plan and change:
claude -p "Plan how to migrate the session store to Redis. Do not edit." \
--permission-mode plan --output-format json | jq -r '.result' > plan.md
# read or check plan.md, then:
claude -p "Carry out the plan in plan.md, then run the tests." \
--permission-mode acceptEditsCopiedIn acceptEdits the second run edits files and runs common filesystem commands without asking, but other shell commands, your test runner included, still need an --allowedTools entry such as "Bash(npm test *)" or another mode. Running jobs like this on a server, on a timer, is in Claude Code headless on a schedule.