All posts
AI Agents

Claude Code Plan Mode: Plan Before It Edits

Claude Code plan mode lets Claude read, explore and write a plan but blocks edits until you approve it. How to enter it, leave it, and when to skip it.

October 4, 2026·7 min read·by Olexander Cheberko
Table of contentstap to expand

Claude Code plan mode, sometimes called planning mode, is a permission mode in which Claude reads files, runs shell commands to explore and writes a plan, but does not edit your source until you approve that plan (permission modes). You turn it on with Shift+Tab, by starting a prompt with /plan, or with claude --permission-mode plan, and you leave it by approving the plan or pressing Shift+Tab again. I checked everything below against the docs on October 3, 2026.

What does plan mode do?

In the docs' words, plan mode "tells Claude to research and propose changes without making them." When Claude needs to understand the codebase, it hands the research to the built-in Plan subagent, whose tools are read-only with Write and Edit denied, so the exploration output stays in its own context window (built-in subagents). Claude can also switch into plan mode on its own with the EnterPlanMode tool, which needs no permission, and it presents the finished plan through ExitPlanMode, which does (tools reference).

How do you turn plan mode on?

WhereHow
A running terminal sessionPress Shift+Tab until the status bar shows ⏸ plan mode on
The promptType /plan, or /plan fix the auth bug to switch and start that task (commands)
One new sessionclaude --permission-mode plan
Every terminal session in a projectdefaultMode set to plan in .claude/settings.json
The VS Code extensionThe mode indicator, or claudeCode.initialPermissionMode set to plan

The number of presses depends on where you start. Shift+Tab cycles Manual, accept edits, then plan, so from Manual it takes two, which is what Claude Code's own spinner tip says (spinner tips). With Claude Code v2.1.283 or later, terminal sessions start in auto mode by default, and from auto the first press goes to Manual, so plan mode is three presses away (switch permission modes). On Windows, when the Node or Bun runtime doesn't enable VT input mode, the key is Alt+M (interactive mode).

To start every terminal session in a project in plan mode, put this in .claude/settings.json:

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

The VS Code extension ignores this project setting; there, set claudeCode.initialPermissionMode to plan in your VS Code user settings instead (plan mode as the default).

How do you approve or leave a plan?

When the plan is ready, Claude asks how to proceed (review and approve a plan):

  • Yes, and use auto mode approves and continues in auto mode. Where auto mode isn't available, it reads Yes, auto-accept edits; in a session started with bypass permissions enabled, it offers to switch to bypass permissions instead.
  • Yes, manually approve edits approves and asks you about each edit.
  • No, keep planning keeps plan mode on so you can say what to change.

Ctrl+G opens the plan in your default text editor to edit before Claude proceeds; in VS Code, the plan opens as a full Markdown document where you can add inline comments (VS Code extension). Setting showClearContextOnPlanAccept to true adds a first option, Yes, clear context and …, that approves, clears the conversation and starts implementing from the plan alone (showClearContextOnPlanAccept). To leave without approving, press Shift+Tab. To plan again later, cycle back or start the next prompt with /plan.

Can Claude run commands in plan mode?

Yes. Plan mode blocks edits, not the shell. Claude runs shell commands to explore, and the first case that matches decides what happens to each one:

  • In an interactive terminal session with bypass permissions available, neither a classifier nor a prompt applies.
  • When auto mode is available and useAutoModeDuringPlan is on, as it is by default, the auto mode classifier reviews each command other than critical-path removals, such as rm -rf ~, instead of prompting you. Approved commands run and rejected ones are blocked.
  • Otherwise, any command outside the built-in read-only set asks for your approval.

To get a prompt for every such command while planning, set "useAutoModeDuringPlan": false. Claude Code reads the key from user, local or managed settings, so a repository can't turn it off for you (useAutoModeDuringPlan).

What does plan mode not block?

In an interactive terminal session started in a way that puts bypass permissions in the mode cycle, such as with --dangerously-skip-permissions or --allow-dangerously-skip-permissions, Claude Code doesn't enforce plan mode's blocks: Claude is still told to plan without editing, but an edit or command it attempts during planning runs without a prompt (bypassPermissions mode). Explicit ask rules and rm or rmdir removals targeting a critical path still prompt. Without an interactive terminal, as in -p runs, the Agent SDK and the VS Code chat panel, plan mode keeps its blocks.

Does plan mode survive a resume?

Not in a terminal. A session that ended in plan mode and is resumed with claude --continue or claude --resume starts in whatever mode a new session would start in (permission mode on resume). Pass --permission-mode plan when you resume. The VS Code extension restores plan mode, with exceptions listed on its page.

Which model writes the plan?

Usually the session's model: the Plan subagent that does the research inherits the main conversation's model (built-in subagents). One exception in the docs is a Haiku session, which normally upgrades to Sonnet in plan mode (model configuration). Planning can also get its own model: the opusplan alias uses opus while plan mode is on and switches to sonnet for execution; set it with /model opusplan or claude --model opusplan (opusplan).

When does plan mode pay off?

The best practices page names three cases: you're uncertain about the approach, the change modifies multiple files, or you're unfamiliar with the code being modified. Letting Claude jump straight to coding, it warns, "can produce code that solves the wrong problem." A written plan also gives a reviewer something to check against: the same page suggests a subagent that reviews the diff against the plan in a fresh context (adversarial review). That is the role an independent fact-checker plays for every article on this blog: it re-reads the official docs instead of trusting the writer, and it has caught real errors (writer and verifier subagents).

When is plan mode just overhead?

The best practices page admits it: "Plan mode is useful, but also adds overhead." For a small fix with a clear scope, such as a typo, a log line or a renamed variable, ask Claude to do it directly: "If you could describe the diff in one sentence, skip the plan." By that test, removing an em dash that scripts/content_lint.py flagged in one post needs no plan. For exploratory work, let Claude try and, if it fails, double-tap Escape or run /rewind to restore an earlier checkpoint; checkpoints track only edits made through Claude's file editing tools, not Bash commands (rewind with checkpoints).

Does approving a plan approve everything after it?

No. Approving ends plan mode, and what follows depends on the option you pick: Yes, manually approve edits still asks about each edit, while Yes, and use auto mode hands later actions to the auto mode classifier, which reviews most of them instead of you (auto mode). My own gates sit further down the chain: my personal CLAUDE.md says never commit or push without my explicit approval, and the agents that write for this site never push on their own. The docs say Claude treats CLAUDE.md "as context, not enforced configuration" (memory), so a rule that must always hold needs a check that runs.

Where to go next

Plan mode decides when Claude may start editing. After that, a hook can run a check such as this blog's content linter on every file Claude writes: Claude Code hooks that enforce the rules agents forget.

Tags

claude-code-plan-modeclaude-codeclaude-code-planning-modepermission-modesai-agent-guardrails

Frequently asked questions

How do I exit plan mode in Claude Code?

Approve the plan or press Shift+Tab. Approving with Yes, and use auto mode or Yes, manually approve edits ends plan mode and switches the session to the mode that option names, so Claude starts editing. Shift+Tab leaves without approving and moves to the next mode in the cycle: bypass permissions if it is in the cycle, otherwise auto mode if it is available, otherwise Manual. No, keep planning keeps plan mode on.

Can Claude Code run commands in plan mode?

Yes. Plan mode blocks edits, not the shell: Claude runs shell commands to explore while it plans. In an interactive terminal session with bypass permissions available, they run without a prompt. Otherwise, when auto mode is available and useAutoModeDuringPlan is on, which is the default, a classifier reviews each command other than critical-path removals instead of you; without it, every command outside the built-in read-only set asks for your approval.

Where does Claude Code save plan files?

In ~/.claude/plans by default. The plansDirectory setting moves them to a path relative to the project root, such as ./plans. A path that resolves outside the project is not used, and the default stays.

What happened to Ultraplan in Claude Code?

Anthropic removed the Ultraplan research preview, including the /ultraplan command, the ultraplan keyword and the approval option that refined a plan on Claude Code on the web. The docs point to local plan mode instead, or to a cloud session when you want to plan and review in a browser.

Related posts