Skip to content
,

Claude Code Plan Mode: How to Use It (Shift+Tab, /plan and Settings)

9–13 minutes
Winking red-haired woman in a futuristic data lab holding a card with the Claude logo, text plan first, then code

The fastest way to waste a Claude Code session is to let it start editing before it understands the problem. Plan mode fixes that: Claude reads your code, explores, and writes a plan, but it cannot touch your source until you approve.

This guide covers every way to turn plan mode on, what Claude can and cannot do inside it, the approval options, editing a plan with Ctrl+G, opusplan, making plan mode the default, and the problems people run into.

TL;DR

  • Turn it on: press Shift+Tab until the footer shows ⏸ plan mode on, start with claude --permission-mode plan, or prefix one prompt with /plan.
  • What it does: Claude can read files and run exploring commands, then writes a plan. File edits stay blocked until you approve.
  • Approve: pick auto mode (or auto-accept edits), approve edits one by one, or keep planning.
  • Edit the plan: press Ctrl+G to open it in your text editor before Claude starts.
  • Save money: /model opusplan plans with Opus and builds with Sonnet.
  • Make it default: set "permissions": {"defaultMode": "plan"} in .claude/settings.json.

What Plan Mode Is

Plan mode is one of Claude Code’s permission modes. It lets Claude research and propose changes without editing your source files.

In plan mode Claude will:

  1. Read the files it needs, search the codebase and run commands to explore.
  2. Ask you clarifying questions when the task is unclear.
  3. Write a plan: which files change, in what order, and how it will test the result.
  4. Stop and wait for you to approve, change or reject that plan.

Only after approval does Claude switch to an editing mode and start work. You get a cheap, reviewable checkpoint before any code changes.

Quick answer: use plan mode for anything that touches more than one or two files, for unfamiliar codebases, and for refactors. Skip it for one-line fixes where the plan would be longer than the change.

4 Ways to Turn On Plan Mode

1. Shift+Tab (fastest)

Inside a running session, press Shift+Tab to cycle permission modes. The order is default (Manual), then acceptEdits (Edit automatically), then plan. If you are in auto mode, the first press drops you to default first.

The footer shows ⏸ plan mode on when it is active. Press Shift+Tab again to leave plan mode without approving anything.

2. Start a session in plan mode

claude --permission-mode plan

The same flag works for non-interactive runs, which is handy for asking Claude to write a plan into a file from a script:

claude -p --permission-mode plan "Plan how to add rate limiting to the API. List files and steps."

3. /plan for a single prompt

Prefix one message with /plan to plan just that request, without changing the session’s mode:

/plan migrate the auth module from sessions to JWT

4. Make plan mode the default for a project

Add this to the project’s .claude/settings.json, and every terminal session in that repo starts in plan mode:

{
  "permissions": {
    "defaultMode": "plan"
  }
}

Tip: put it in .claude/settings.local.json instead if you want plan-first sessions for yourself without changing your teammates’ setup.

Plan Mode in VS Code, Desktop and the Web

Where you use Claude Code How to pick plan mode Make it the default
Terminal (CLI) Shift+Tab, --permission-mode plan or /plan permissions.defaultMode in settings.json
VS Code extension Mode selector in the chat panel VS Code user setting claudeCode.initialPermissionMode = plan
Claude desktop app Choose Plan in the mode selector under the prompt box Applies to the current session only
claude.ai/code (cloud) Choose Plan in the mode dropdown Per session

Note: the VS Code extension does not read defaultMode from project settings for its starting mode, so use the VS Code setting above. New to cloud sessions? See my guide to Claude Code on the web.

What Claude Can and Cannot Do in Plan Mode

Action In plan mode
Read files, search, list folders Yes, without asking
Run read-only shell commands (git log, ls, grep) Yes
Run other shell commands (tests, builds) Depends on your setup (see below)
Edit or create source files No, blocked until you approve
Write the plan file Yes, to ~/.claude/plans/ or your plansDirectory
Deny rules in settings Still enforced

How shell commands are handled while planning

  • Auto mode available and useAutoModeDuringPlan on (the default): a safety classifier reviews each command. Approved ones run, rejected ones are blocked.
  • Auto mode not available, or that setting off: anything outside the built-in read-only set asks you first.
  • Session launched with bypass permissions available: planning commands run without prompts. Claude is still told not to edit, but nothing stops a command it decides to run, so be careful here.

Plan mode keeps its blocks in -p runs, Agent SDK sessions and the VS Code chat panel.

Approving, Rejecting and Editing a Plan

When the plan is ready, Claude shows it and asks how to continue:

Option What happens next
Yes, and use auto mode Plan approved, Claude switches to auto mode and works through it. Shows as Yes, auto-accept edits if auto mode is not available to you.
Yes, manually approve edits Plan approved, but you confirm each file edit.
No, keep planning Stay in plan mode and tell Claude what to change.
(Optional) approve and clear context Shown when showClearContextOnPlanAccept is on. Starts building with a clean context.
  1. Read the plan properly. Check the file list and the test step. A missing test step is the most common gap.
  2. Press Ctrl+G to edit it if you only need small changes. The plan opens in your default text editor; save and close to hand it back.
  3. Choose “No, keep planning” for bigger changes and reply with what is wrong (“don’t touch the DB schema, add a migration instead”).
  4. Approve with the option that matches how much you trust the plan.

Approving also gives the session a title based on the plan, unless you already named it. To plan again later, press Shift+Tab back to plan or use /plan.

Tip: the plan is saved as a file, so you can keep it in the repo as a spec. Ask Claude to copy it to docs/plans/ once you approve.

Plan Mode vs Every Other Permission Mode

Mode (config value) UI label Runs without asking Best for
default Manual Reads only Reviewing every action
acceptEdits Edit automatically Reads, edits and common file commands in the project Fast iteration you review in git
plan Plan Reads (plus classifier-approved commands) Exploring before changing
auto Auto Everything, checked by a background classifier Long tasks after a good plan
dontAsk (not in Shift+Tab cycle) Pre-approved tools only, the rest is denied CI and scripts
bypassPermissions Bypass permissions Everything Throwaway containers and VMs only

Plan mode is the safest of the interactive modes. A common pattern is plan first, then approve into auto mode so Claude can finish without stopping every few seconds.

opusplan: Opus to Plan, Sonnet to Build

opusplan is a special model setting. It uses Opus while you are in plan mode and switches to Sonnet when Claude starts implementing.

/model opusplan
# or at startup
claude --model opusplan
# or in settings.json
{ "model": "opusplan" }

On the Anthropic API that currently means Opus 5.5 for planning and Sonnet 5.5 for building. Use opusplan[1m] to ask for the 1M context window in both phases where it is not already the default.

Setup Plan quality Build cost Good for
Sonnet for both Good Low Everyday tasks, Pro plan
opusplan Best Low Bigger features on a budget
Opus for both Best High Hard bugs, Max and Ultra plans

Opus uses your plan limits faster than Sonnet, so opusplan puts the expensive model where it matters most. My Claude Code pricing guide explains how each model eats into the 5-hour window.

A Plan-First Workflow That Works

  1. Start clean. Commit or stash your work so you can diff and roll back afterwards.
  2. Enter plan mode and describe the goal, not the steps: what should work when Claude is done, and any rules (no new dependencies, keep the public API).
  3. Let it explore. Answer its questions. Point it at the right folders if it wanders.
  4. Push back on the plan. Ask “what could go wrong?” and “how will you test this?” before approving.
  5. Approve into auto or accept-edits mode and let it work.
  6. Review the diff with git diff, run the tests yourself, then commit.

Warning: a plan is only as good as the context behind it. If your project has build quirks, put them in CLAUDE.md so every plan respects them. My Claude Code cheat sheet covers /init and memory files.

Good Plan Mode Prompts

  • Feature: “Plan how to add CSV export to the reports page. Reuse the existing table component, add tests, no new packages.”
  • Bug: “Find why login fails after the token refresh. Show me the root cause and two fix options before planning the change.”
  • Refactor: “Plan splitting utils.ts into smaller modules. Keep every export working and list each file you will touch.”
  • Onboarding: “Explain how a request flows from the router to the database, then plan where a caching layer would go.”
  • Upgrade: “Plan the upgrade from React 18 to 19. List breaking changes that affect this repo and the order to fix them.”

Troubleshooting

Shift+Tab never reaches plan mode

Keep pressing: the cycle goes Manual, Edit automatically, Plan. If your organisation’s managed settings lock the permission mode, plan may be unavailable; run /status to see which settings source applies.

Claude keeps asking permission for commands while planning

That happens when auto mode is not available or useAutoModeDuringPlan is off. Approve the read-only commands, or add allow rules for safe ones like Bash(npm run test *).

A command changed files during planning

You likely launched with bypass permissions available. In that setup planning commands are not prompted. Restart without --dangerously-skip-permissions for a strict plan phase.

Ctrl+G opens the wrong editor or nothing

Claude Code opens your default text editor. On most systems that follows the EDITOR (or VISUAL) environment variable, so set it, for example export EDITOR="code --wait", and restart.

VS Code ignores defaultMode

Expected. Set claudeCode.initialPermissionMode to plan in your VS Code user settings instead.

The plan is vague or skips tests

Choose “No, keep planning” and ask for a file-by-file list with a test step for each change. Switching to opusplan or Opus also helps on large codebases.

My Take

Plan mode is the single habit that made Claude Code feel reliable to me on real projects. Two minutes of planning saves twenty minutes of undoing edits in the wrong direction.

My default now: plan mode with opusplan for anything non-trivial, approve into auto mode, then review the diff in git. If you use Claude Code with other models through a router, check my Claude Code Router guide for which ones plan well.

FAQ

How do I enable plan mode in Claude Code?

Press Shift+Tab until the footer shows “plan mode on”, start with claude --permission-mode plan, or type /plan before a single prompt.

Can Claude edit files in plan mode?

No. It can read, search and run exploring commands, but source edits stay blocked until you approve the plan.

How do I exit plan mode?

Approve the plan to switch into an editing mode, or press Shift+Tab to leave plan mode without approving.

Where are Claude Code plans saved?

In ~/.claude/plans/ by default, or in the folder set by the plansDirectory setting.

What is opusplan in Claude Code?

A model setting that uses Opus while planning and Sonnet while implementing. Turn it on with /model opusplan.

Can I make plan mode the default?

Yes. Set permissions.defaultMode to "plan" in .claude/settings.json. In VS Code, use the claudeCode.initialPermissionMode setting.

Does plan mode use fewer tokens?

Not by itself, since Claude still reads files. It saves tokens overall by preventing wrong edits you would have to undo and redo.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Winking red-haired woman in a futuristic data lab holding a card with the Claude logo, text plan first, then code