<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Plan Mode on RockB</title><link>https://baeseokjae.github.io/tags/plan-mode/</link><description>Recent content in Plan Mode on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 21 Apr 2026 06:14:12 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/plan-mode/index.xml" rel="self" type="application/rss+xml"/><item><title>Claude Code Plan Mode Guide 2026: How to Use Plan Before You Code</title><link>https://baeseokjae.github.io/posts/claude-code-plan-mode-guide-2026/</link><pubDate>Tue, 21 Apr 2026 06:14:12 +0000</pubDate><guid>https://baeseokjae.github.io/posts/claude-code-plan-mode-guide-2026/</guid><description>Master Claude Code Plan Mode: activation, workflows, team adoption, and best practices to prevent AI coding mistakes. 2026 guide</description><content:encoded><![CDATA[<p>Claude Code Plan Mode is a read-only exploration state that lets Claude analyze your codebase, map dependencies, and propose a full implementation plan — before touching a single file. Enable it with Shift+Tab or <code>/plan</code>, review the proposal, then execute. This one habit eliminates the &ldquo;almost right&rdquo; debugging trap that affects 66% of developers using AI coding tools.</p>
<h2 id="what-is-claude-code-plan-mode">What Is Claude Code Plan Mode?</h2>
<p>Claude Code Plan Mode is an enforced read-only state within the Claude Code CLI that prevents the AI from writing, editing, or executing any code until you explicitly approve its plan. Unlike simply asking Claude to &ldquo;think first&rdquo; — which is advisory and easily overridden — Plan Mode is a hard constraint enforced by the tool. In Plan Mode, Claude retains full access to read tools: Read, LS, Glob, Grep, WebSearch, WebFetch, TodoRead, and TodoWrite. All write tools are blocked: Edit, MultiEdit, Write, and Bash execution commands. This separation matters because 66% of developers report AI solutions are &ldquo;almost right&rdquo; — working initially but harboring subtle issues that take hours to debug. By forcing a think-first phase, Plan Mode structurally prevents Claude from solving the wrong problem, writing code in the wrong file, or missing dependencies that only become visible after exploration. For production codebases and multi-file changes, this is the single highest-leverage practice you can adopt in 2026.</p>
<h3 id="what-tools-are-available-in-plan-mode">What Tools Are Available in Plan Mode?</h3>
<p>In Plan Mode, Claude can use all read-only tools but no write tools. Here&rsquo;s the exact breakdown:</p>
<table>
  <thead>
      <tr>
          <th>Tool Category</th>
          <th>Available in Plan Mode</th>
          <th>Blocked in Plan Mode</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>File Reading</td>
          <td>Read, LS, Glob, Grep</td>
          <td>—</td>
      </tr>
      <tr>
          <td>Web Research</td>
          <td>WebSearch, WebFetch</td>
          <td>—</td>
      </tr>
      <tr>
          <td>Task Tracking</td>
          <td>TodoRead, TodoWrite</td>
          <td>—</td>
      </tr>
      <tr>
          <td>File Editing</td>
          <td>—</td>
          <td>Edit, MultiEdit, Write</td>
      </tr>
      <tr>
          <td>Shell Execution</td>
          <td>—</td>
          <td>Bash (write ops)</td>
      </tr>
  </tbody>
</table>
<p>This hard constraint is what separates Plan Mode from a prompt-engineering workaround. Claude cannot accidentally create a file, modify a config, or run a migration — regardless of how confident it is.</p>
<h2 id="how-do-you-activate-claude-code-plan-mode">How Do You Activate Claude Code Plan Mode?</h2>
<p>Claude Code Plan Mode can be activated through four methods: pressing Shift+Tab twice to cycle from Normal Mode → Plan Mode → Auto-accept Mode, typing the <code>/plan</code> slash command in the Claude Code CLI, typing a natural language directive like &ldquo;plan this task&rdquo; or &ldquo;don&rsquo;t write any code yet, just plan,&rdquo; or enabling the Auto Plan Mode setting in your project configuration for teams that want maximum safety guardrails. The Shift+Tab cycle is the fastest method for individual developers already in a session — one keypress moves from Normal to Plan Mode, a second moves to Auto-accept, and a third cycles back to Normal. The <code>/plan</code> command is cleaner for intentional workflow switches and works from any state. Natural language directives are useful when you want Plan Mode for a specific sub-task without resetting the session state. Auto Plan Mode is the recommended setting for production codebases or teams onboarding junior developers who may not remember to activate it manually. All four methods produce the same result: Claude begins researching without writing.</p>
<h3 id="shifttab-the-three-mode-cycle">Shift+Tab: The Three-Mode Cycle</h3>
<p>The Shift+Tab shortcut cycles through Claude Code&rsquo;s three operating modes in order:</p>
<ol>
<li><strong>Normal Mode</strong> — Default. Claude reads and writes as needed.</li>
<li><strong>Plan Mode</strong> — Read-only. Claude researches and proposes; no writes.</li>
<li><strong>Auto-accept Mode</strong> — Claude executes changes automatically without confirmation prompts.</li>
</ol>
<p>For most professional workflows, you&rsquo;ll use Normal and Plan Mode. Auto-accept is appropriate only for well-scoped, low-risk tasks where you trust the output completely.</p>
<h3 id="the-plan-command-and-natural-language-directives">The /plan Command and Natural Language Directives</h3>
<p>The <code>/plan</code> slash command switches to Plan Mode from any current state. Natural language alternatives include:</p>
<ul>
<li>&ldquo;Plan this task before writing any code&rdquo;</li>
<li>&ldquo;Don&rsquo;t modify files yet — just map out what needs to change&rdquo;</li>
<li>&ldquo;Research first, then propose your approach&rdquo;</li>
</ul>
<p><strong>Known failure mode:</strong> Claude sometimes exits Plan Mode mid-session, especially during long conversations. If you notice write tool calls appearing unexpectedly, re-activate with <code>/plan</code> or Shift+Tab. This is a known limitation — check your mode indicator in the status line regularly for critical sessions.</p>
<h2 id="what-is-the-plan--execute-workflow">What Is the Plan → Execute Workflow?</h2>
<p>The Plan → Execute workflow is a structured nine-step process that separates AI research from AI implementation to produce higher-quality, more predictable code changes. The workflow runs: Read (load relevant files into context) → Map (identify all files that will be affected) → Propose (draft the implementation plan) → Review (you inspect the plan for correctness) → Approve (you confirm or ask for revisions) → Edit (Claude makes the changes) → Apply (changes are written to disk) → Verify (Claude checks the result) → Report (Claude summarizes what changed and why). This workflow produces measurably better outcomes than ask-and-execute because the Propose step forces Claude to surface all dependencies before touching code. A plan for a database migration, for example, will enumerate migration files, model files, test files, and API endpoints — giving you a complete change surface to review before a single line is written. The result is fewer surprise breakages and cleaner diffs that are easier to review in pull requests.</p>
<h3 id="step-by-step-breakdown">Step-by-Step Breakdown</h3>
<p><strong>Read Phase:</strong> Claude loads the files you&rsquo;ve mentioned plus any it discovers through Glob and Grep. This phase often surfaces files you forgot to mention.</p>
<p><strong>Map Phase:</strong> Claude builds a dependency map — which files import which modules, which tests cover which functions, which config files control which behaviors.</p>
<p><strong>Propose Phase:</strong> Claude writes the full plan in plain language: &ldquo;I&rsquo;ll modify X to do Y, update Z to reflect the new interface, and add test coverage in W.&rdquo;</p>
<p><strong>Review Phase:</strong> This is your gate. Read the proposal critically. Common issues to catch:</p>
<ul>
<li>Plans that modify more files than necessary</li>
<li>Plans that miss test updates</li>
<li>Plans that assume a library version you don&rsquo;t have</li>
</ul>
<p><strong>Execute Phase:</strong> After approval, exit Plan Mode (Shift+Tab back to Normal) and let Claude implement. The prior research means Claude has full context — no mid-task file reads, no surprises.</p>
<h2 id="when-should-you-use-plan-mode">When Should You Use Plan Mode?</h2>
<p>Plan Mode delivers the highest return on investment for complex, multi-file, or high-stakes changes where a mistake would be expensive to reverse. The five canonical use cases are: framework migrations (updating React 18 to 19 across 200 components), security audits (mapping all places user input touches a database), multi-file feature additions (adding auth middleware that touches routes, models, tests, and config), dependency upgrades (replacing a deprecated library across an entire codebase), and onboarding to unfamiliar codebases (understanding how a module works before changing it). In all five cases, the cost of planning is low — Claude spends 30-90 seconds researching — while the cost of executing without a plan is high: broken builds, missed files, or subtle behavioral regressions. The 45% of developers who report that debugging AI-generated code takes longer than writing it themselves are predominantly working on complex, multi-file changes without using Plan Mode. For these tasks, Plan Mode is not optional — it&rsquo;s the difference between a clean PR and a debugging session.</p>
<h3 id="when-should-you-skip-plan-mode">When Should You Skip Plan Mode?</h3>
<p>Plan Mode adds overhead. Skip it for:</p>
<ul>
<li><strong>Single-line changes:</strong> Fixing a typo, updating a constant, correcting a variable name</li>
<li><strong>Well-defined isolated tasks:</strong> &ldquo;Add a console.log here&rdquo; or &ldquo;rename this function&rdquo;</li>
<li><strong>Quick exploration:</strong> Asking Claude a question about how code works (no write intent)</li>
<li><strong>Repetitive pattern application:</strong> If you&rsquo;ve done the same change 10 times and it&rsquo;s always right</li>
</ul>
<p>The decision framework: if you can describe the complete change in one sentence and are confident there are no hidden dependencies, skip Plan Mode. If you&rsquo;re uncertain about the scope, activate it.</p>
<h2 id="how-does-plan-mode-compare-to-other-safety-strategies">How Does Plan Mode Compare to Other Safety Strategies?</h2>
<p>Plan Mode is one of several safety strategies in the Claude Code toolkit, each optimized for different failure modes. Plan Mode prevents solving-the-wrong-problem mistakes by enforcing upfront research. The <code>/compact</code> command compresses conversation history to save context window space — useful for long sessions but doesn&rsquo;t prevent write mistakes. Fresh sessions clear all context and start clean — useful when Claude has accumulated incorrect assumptions, per the Two-Correction Rule (if you&rsquo;ve corrected the same issue twice, start fresh). Subagents run research in isolated context windows, saving 40%+ of input tokens and enabling parallel investigation — complementary to Plan Mode, not a replacement. <code>/effort max</code> increases Claude&rsquo;s reasoning depth for the current task — useful inside Plan Mode for complex architecture decisions. The combination of Plan Mode + <code>/effort max</code> is the recommended approach for security audits and migration planning: maximum research depth, zero write access until you approve.</p>
<table>
  <thead>
      <tr>
          <th>Strategy</th>
          <th>Prevents</th>
          <th>Best For</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Plan Mode</td>
          <td>Wrong-problem execution</td>
          <td>Multi-file changes, architecture</td>
      </tr>
      <tr>
          <td>/compact</td>
          <td>Context overflow</td>
          <td>Long sessions</td>
      </tr>
      <tr>
          <td>Fresh session</td>
          <td>Accumulated wrong assumptions</td>
          <td>After 2+ corrections on same issue</td>
      </tr>
      <tr>
          <td>Subagents</td>
          <td>Token waste, context pollution</td>
          <td>Parallel codebase research</td>
      </tr>
      <tr>
          <td>/effort max</td>
          <td>Shallow reasoning</td>
          <td>Complex architecture decisions</td>
      </tr>
  </tbody>
</table>
<h2 id="what-is-the-plan-mode--claudemd-two-pillar-approach">What Is the Plan Mode + CLAUDE.md Two-Pillar Approach?</h2>
<p>The two-pillar approach to safe AI coding combines Plan Mode (enforced think-first execution) with CLAUDE.md (persistent project context) to eliminate the two most common categories of AI coding mistakes: solving the wrong problem and solving the right problem wrong. CLAUDE.md is a markdown file in your project root that Claude Code reads automatically at the start of every session. It should contain your project architecture, naming conventions, forbidden patterns, and testing requirements. When Claude enters Plan Mode in a project with a well-crafted CLAUDE.md, its research phase is grounded in your actual constraints — it won&rsquo;t propose a plan that violates your patterns because it already knows them. Martin Fowler&rsquo;s &ldquo;context engineering&rdquo; concept frames this as crafting the right environment for the AI tool, not just the right prompt. The CLAUDE.md golden rule: for each line, ask &ldquo;Would removing this cause Claude to make mistakes?&rdquo; If not, cut it. Combined with Plan Mode, this two-pillar approach gives you a system where Claude always knows your constraints before it researches, and always researches before it writes.</p>
<h3 id="what-should-go-in-claudemd">What Should Go in CLAUDE.md?</h3>
<table>
  <thead>
      <tr>
          <th>Section</th>
          <th>What to Include</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Architecture</td>
          <td>Module boundaries, key abstractions, data flow</td>
      </tr>
      <tr>
          <td>Conventions</td>
          <td>Naming patterns, file organization, import style</td>
      </tr>
      <tr>
          <td>Forbidden patterns</td>
          <td>Anti-patterns you&rsquo;ve banned (e.g., no raw SQL)</td>
      </tr>
      <tr>
          <td>Testing requirements</td>
          <td>Coverage expectations, test file locations</td>
      </tr>
      <tr>
          <td>External dependencies</td>
          <td>Key library versions, API contracts</td>
      </tr>
      <tr>
          <td>Known gotchas</td>
          <td>Non-obvious constraints that catch AI tools off guard</td>
      </tr>
  </tbody>
</table>
<h2 id="what-is-the-dual-claude-review-pattern">What Is the Dual-Claude Review Pattern?</h2>
<p>The Dual-Claude review pattern is an advanced technique where you use two separate Claude Code sessions to produce and then critique an implementation plan, eliminating the confirmation bias that occurs when the same model generates and evaluates its own plan. In Session A, activate Plan Mode and ask Claude to research and propose a plan. Copy the plan output. In Session B, open a fresh Claude Code session with no prior context, paste the plan, and ask: &ldquo;Critique this implementation plan. What&rsquo;s missing? What could go wrong? What assumptions is it making?&rdquo; Session B, having no investment in the plan&rsquo;s correctness, will surface blind spots that Session A systematically missed. This pattern is particularly effective for security-sensitive changes, where the attack surface of a wrong decision is high. The cost is one additional session — roughly 2-5 minutes — against the benefit of an independent review that catches the category of mistakes that internal review consistently misses.</p>
<h2 id="what-are-the-common-plan-mode-pitfalls">What Are the Common Plan Mode Pitfalls?</h2>
<p>The three most common Plan Mode pitfalls are Claude silently exiting Plan Mode mid-session, over-planning simple tasks that don&rsquo;t need it, and accepting a plan without reading it critically. Claude exiting Plan Mode is the most dangerous because you don&rsquo;t notice until a file has been modified unexpectedly — mitigate by watching the mode indicator and re-activating with <code>/plan</code> at the start of any new sub-task. Over-planning manifests as spending 3 minutes in Plan Mode for a 30-second change — use the single-sentence test to decide. Accepting plans without critical review defeats the entire purpose: the Review step is where you add value, not just click &ldquo;yes.&rdquo; Read every file the plan proposes to touch, ask whether the scope is right, and push back if Claude is over-engineering. A good plan should feel slightly conservative — it&rsquo;s a sign Claude isn&rsquo;t inventing scope.</p>
<h3 id="troubleshooting-claude-exits-plan-mode">Troubleshooting: Claude Exits Plan Mode</h3>
<p>If you notice Claude attempting write operations during what you intended as a planning session:</p>
<ol>
<li>Stop the current generation immediately (Escape)</li>
<li>Re-activate Plan Mode with Shift+Tab or <code>/plan</code></li>
<li>Explicitly state: &ldquo;We are still in planning. Do not write any files.&rdquo;</li>
<li>For long sessions, consider enabling Auto Plan Mode to enforce it automatically</li>
</ol>
<h2 id="how-do-you-adopt-plan-mode-for-teams">How Do You Adopt Plan Mode for Teams?</h2>
<p>Team adoption of Plan Mode works best through the Auto Plan Mode setting, which configures Claude Code to start every session in Plan Mode by default, requiring explicit mode-switching before any writes occur. This setting functions as a maximum-safety guardrail for production codebases: junior developers who forget to plan are protected by the default, senior developers can switch out of it for low-risk tasks, and the team&rsquo;s PR review burden decreases because AI-generated changes arrive with an attached plan document. The recommended rollout sequence is: enable Auto Plan Mode for one team for two weeks, measure PR revision rate and debugging time, then expand based on results. Teams that have adopted this pattern report that AI-generated PRs require fewer revision cycles because reviewers can evaluate the plan intent alongside the diff — not just guess why a file was changed.</p>
<h3 id="auto-plan-mode-setup">Auto Plan Mode Setup</h3>
<p>Auto Plan Mode can be enabled in your Claude Code project settings. Once enabled:</p>
<ul>
<li>Every new session starts in Plan Mode</li>
<li>Claude must be explicitly moved to Normal Mode to write</li>
<li>The mode switch creates an audit trail of when planning ended and execution began</li>
<li>Particularly valuable for teams with production deployments on <code>main</code></li>
</ul>
<h2 id="real-world-use-cases-for-plan-mode">Real-World Use Cases for Plan Mode</h2>
<p>Plan Mode excels in five real-world scenarios that represent the highest-risk AI coding operations. Framework migrations — such as moving from React 18 to 19, Next.js 13 to 14, or Node 18 to 22 — involve hundreds of files, breaking API changes, and non-obvious compatibility issues that only surface during codebase-wide research. Security audits use Plan Mode to map all data flows before proposing fixes, ensuring no input surface is missed. Multi-file feature additions — authentication systems, logging infrastructure, analytics pipelines — require dependency mapping before writing to avoid circular imports and missed integration points. Dependency upgrades replace library APIs across entire codebases, where a plan surfaces every call site before any change is made. Unfamiliar codebase onboarding lets a new team member or contractor use Plan Mode to build a complete understanding of a module before proposing changes — producing PRs that are architecturally coherent rather than surface-level patches.</p>
<h2 id="advanced-tips-getting-more-from-plan-mode">Advanced Tips: Getting More From Plan Mode</h2>
<p>Three advanced techniques extract maximum value from Plan Mode beyond basic activation. First, pair Plan Mode with <code>/effort max</code> for complex architecture decisions — this instructs Claude to use its full reasoning capacity during the research phase, producing more thorough dependency maps and risk assessments. Second, use subagent pre-research: before activating Plan Mode in the main session, run a subagent to research specific files or modules in an isolated context window, saving 40%+ of main session tokens and giving Plan Mode a richer starting context. Third, use batch reviews — let Claude execute a series of related changes in Plan Mode, collect all proposed changes, then review the batch with <code>git diff</code> rather than approving one change at a time. This approach reduces decision fatigue and catches cross-change inconsistencies that per-change review misses. These three techniques — <code>/effort max</code>, subagent pre-research, and batch review — represent the professional-grade Claude Code workflow for 2026.</p>
<h2 id="how-does-claude-code-compare-to-other-ai-coding-tools">How Does Claude Code Compare to Other AI Coding Tools?</h2>
<p>Claude Code&rsquo;s Plan Mode has no direct equivalent in Cursor or GitHub Copilot. Cursor has Composer for multi-file changes but no enforced read-only research phase. GitHub Copilot Chat offers conversational planning but the same model that plans will immediately write if you click &ldquo;apply&rdquo; without explicit confirmation. Windsurf has a similar concept in its Cascade mode but without the hard tool-level enforcement. The key differentiator is enforcement: Claude Code&rsquo;s Plan Mode blocks write tools at the system level, not through prompt engineering. This means Claude cannot accidentally write a file even if its reasoning leads it there. This enforcement, combined with Claude Code&rsquo;s 5.5x token efficiency advantage over Cursor for equivalent tasks, makes it the most cost-effective option for teams running AI coding at scale. Claude Code&rsquo;s 95% first-try correctness rate and 58% SWE-bench Verified score are the benchmarks competitors are measured against in 2026.</p>
<hr>
<h2 id="faq">FAQ</h2>
<p>Claude Code Plan Mode is one of the most-asked-about features among developers adopting AI coding tools in 2026. The questions below address the most common points of confusion: how to activate Plan Mode, what distinguishes it from normal Claude Code behavior, the known limitation where Claude can exit Plan Mode unexpectedly, when the overhead isn&rsquo;t worth it for simple tasks, and the advanced Dual-Claude review pattern for security-critical changes. These answers are self-contained — each can be read independently without the full article context. If you&rsquo;re adopting Plan Mode for your team, the Auto Plan Mode setting question is the most actionable place to start: enabling it by default removes the activation step entirely and makes safe-by-default AI coding the path of least resistance for every developer on the team.</p>
<h3 id="how-do-i-activate-claude-code-plan-mode">How do I activate Claude Code Plan Mode?</h3>
<p>Press Shift+Tab to cycle from Normal Mode to Plan Mode (one press), type <code>/plan</code> in the CLI, or use a natural language directive like &ldquo;plan this task before writing any code.&rdquo; For teams, enable Auto Plan Mode in project settings to make it the default for every session.</p>
<h3 id="what-is-the-difference-between-plan-mode-and-normal-claude-code">What is the difference between Plan Mode and normal Claude Code?</h3>
<p>In normal mode, Claude can read and write files freely as it works. In Plan Mode, write tools (Edit, MultiEdit, Write, Bash) are blocked at the system level — Claude can only read, search, and propose. This enforced separation prevents premature execution before you&rsquo;ve reviewed the approach.</p>
<h3 id="can-claude-exit-plan-mode-on-its-own">Can Claude exit Plan Mode on its own?</h3>
<p>Yes, this is a known limitation. Claude can sometimes exit Plan Mode mid-session, particularly during long conversations. Monitor the mode indicator in the status line and re-activate with <code>/plan</code> or Shift+Tab if you notice unexpected write attempts. Auto Plan Mode setting helps enforce it automatically.</p>
<h3 id="when-should-i-skip-plan-mode">When should I skip Plan Mode?</h3>
<p>Skip Plan Mode for single-line changes, typo fixes, well-defined isolated tasks, and quick exploratory questions where you have no write intent. The rule of thumb: if you can describe the complete change in one sentence and are confident there are no hidden dependencies, execute directly without planning.</p>
<h3 id="what-is-the-dual-claude-review-pattern-1">What is the Dual-Claude review pattern?</h3>
<p>The Dual-Claude pattern uses two separate sessions: Session A generates the implementation plan in Plan Mode; Session B (fresh, with no prior context) critiques the plan for blind spots and missing cases. Because Session B has no investment in the plan&rsquo;s correctness, it surfaces issues the generating session consistently misses — particularly valuable for security-sensitive changes.</p>
]]></content:encoded></item></channel></rss>