teachyou.ai academy
← All posts
Claude Code

Claude Code Plan Mode: When and How to Use It

Pramod Dutta · Jun 21, 2026 · 16 min read

Why "just start coding" breaks down on real tasks

Every developer who has used an AI coding agent has felt this moment: you type a prompt, hit enter, and watch the agent immediately start editing files. Three minutes later you have a diff touching twelve files, half of which you didn't expect it to touch, and now you're doing archaeology on your own git history trying to figure out what happened and why. The agent wasn't wrong, exactly — it just made a hundred small decisions you never got to weigh in on, and now those decisions are baked into working code.

This is the core problem plan mode in Claude Code is built to solve. Instead of collapsing "understand the task" and "execute the task" into a single pass, plan mode forces a checkpoint between them. Claude reads your codebase, thinks through an approach, and hands you a written plan — before touching a single file. You read it, poke holes in it, ask for changes, and only when you're satisfied do you approve it and let Claude go implement it.

That sounds like a small workflow tweak. In practice it changes how you use an AI coding agent on anything beyond trivial edits. This article walks through what plan mode actually is, when it earns its keep, when it's overkill, and how to run it well — including the mistakes people make when they first try it.

What plan mode actually is

Plan mode is one of Claude Code's permission modes, alongside "default" mode and "accept edits" mode. You cycle between these with Shift+Tab, and the current mode is always shown in the terminal so you know which one you're in. You can also drop into plan mode for a single prompt with the /plan command, or start an entire session in it with the claude --permission-mode plan flag.

The mechanical difference is simple: in plan mode, Claude can still read files and run shell commands to explore your codebase — checking directory structure, reading config, looking at git history — but it cannot edit existing files, write new ones, or run commands that mutate state. It's read-only with full exploration privileges, not a silent or restricted search mode. Permission prompts for anything genuinely sensitive still apply the same way they would in default mode.

When Claude has gathered enough context to propose an approach, it presents a plan — a structured write-up of what it intends to do and which files it expects to touch. At that point you're asked how to proceed: approve and let Claude run in full auto mode, approve and switch to accept-edits mode, approve but review each edit manually, or keep planning with more feedback. If you want to tweak the plan's wording yourself before Claude proceeds, Ctrl+G opens it in your default text editor. If you'd rather not approve anything yet, pressing Shift+Tab again leaves plan mode without accepting.

Once you approve, Claude switches the session into whichever mode you chose and starts implementing. The plan you approved becomes the reference point for that work — Claude executes against it rather than improvising from scratch. Worth noting: this is a one-way door per cycle. If you want to plan again after approving, you cycle back into plan mode explicitly with Shift+Tab or /plan — approving a plan doesn't leave you "back in plan mode" automatically for the next request.

This is different from "accept edits" mode, which is the opposite extreme: Claude edits files immediately without pausing for individual approval, trusting you to review the diff afterward. Plan mode sits upstream of that entirely — it's not about how edits get approved, it's about whether Claude is allowed to think out loud with you before any edits exist at all.

The core workflow, step by step

The plan mode loop looks like this in practice:

  1. Enter plan mode. Press Shift+Tab to cycle into plan mode before you start describing the task, or start a session in plan mode by default (more on configuring this below).
  2. Describe the task in plain language. You don't need to write a spec. Something like "Add rate limiting to the /api/checkout endpoint, keyed by user ID, with a 10 requests/minute limit" is enough to get started.
  3. Let Claude explore. It will read relevant files — the route handler, existing middleware, your dependency list, maybe your Redis or cache client if one exists — without changing anything.
  4. Review the plan. Claude presents its proposed approach: which library it'll use, which files it'll touch, what the rate-limit key looks like, how it handles the 429 response, whether it adds tests. This is your review checkpoint.
  5. Push back or approve. If the plan is missing something — say, it didn't account for your existing Redis client and wants to add a new dependency — you say so right there. Claude revises the plan, still without touching files.
  6. Approve and execute. Once the plan looks right, you approve it. Claude switches out of plan mode and starts implementing exactly what was agreed.
  7. Review the diff. Plan mode reduces surprises, but it doesn't replace code review. You still look at what actually got written.

The value is concentrated almost entirely in steps 3 through 5. That's the part of the loop where a five-minute conversation prevents a wrong implementation from ever getting written, which is much cheaper than reviewing and unwinding a wrong implementation after the fact.

When plan mode earns its keep

Plan mode is not free — it adds a round trip to your workflow. So it's worth being deliberate about when that round trip pays for itself.

Multi-file changes with real architectural choices. If a task can be implemented three different reasonable ways — different libraries, different data flow, different levels of abstraction — you want to see which way Claude is leaning before it commits code to disk. A feature like "add authentication to this API" has enough decision points (session vs. token, where middleware lives, how errors propagate) that reviewing a plan first is far cheaper than reviewing a full diff after.

Unfamiliar or legacy codebases. When Claude is working in a codebase it hasn't touched before in the session, its first read of the code is exactly the read you want to sanity-check. If it misunderstands how your ORM layer is structured, you want to catch that in a plan, not in fifteen edited files.

Anything touching data, migrations, or money. Database schema changes, payment webhook logic, auth flows — these are the categories where "mostly right" isn't good enough and a wrong assumption is expensive to unwind. Plan mode gives you a chance to check the assumptions before they become commits.

Refactors with a blast radius. "Rename this function" is safe to let rip. "Restructure how our API client is organized across the app" touches enough surface area that you want the plan of attack up front — which files move, what the new structure looks like, whether anything needs a compatibility shim.

Onboarding a task to a new engineer, literally or figuratively. If you'd hand a junior engineer a design doc before letting them touch the codebase, that's a signal you should do the same with Claude.

When plan mode is overkill

The instinct after learning a new tool is often to use it everywhere. Resist that here.

Trivial, well-scoped edits. "Fix the typo in this error message" or "add a null check on line 42" don't need a planning phase. The plan would just restate the task back to you. Use default mode or auto-accept mode and move on.

Tasks where you already know exactly what you want. If you can describe the diff you want almost line by line — "change this timeout from 30 to 60 seconds and add a retry with exponential backoff, three attempts" — you've effectively already done the planning. Let Claude execute directly.

Exploratory, throwaway work. If you're prototyping something you expect to discard (a spike, a quick proof-of-concept to see if an API even supports what you want), the overhead of formalizing a plan works against the point of prototyping.

Tight iteration loops. Sometimes the fastest way to converge on the right solution is several small direct edits with quick feedback, rather than one big upfront plan. If you're bouncing between "try this," "no, like this instead," a live diff-and-adjust loop can beat plan-review-execute.

A reasonable rule of thumb: reach for plan mode when the cost of a wrong first attempt is high, and skip it when the cost of a wrong first attempt is a five-second undo.

Configuring plan mode as a default

If you find yourself wanting plan mode more often than not — for example, if you work primarily in a production codebase where you never want unreviewed edits landing — you can configure Claude Code to start in plan mode rather than cycling into it every session.

This is controlled through the permissions.defaultMode key in your settings.json. Set it to "plan" — at the project level in .claude/settings.json if you want it scoped to one repo, or in your user settings if you want it everywhere — and every new session opens already in plan mode. This is particularly useful for teams that want a consistent, safety-first default across everyone using Claude Code against a shared repository — nobody has to remember to turn plan mode on, because it's already the starting state.

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

You can also invoke plan mode directly from the command line for a single session without touching your persistent settings, using claude --permission-mode plan. This even works in non-interactive, scripted runs with the -p flag — claude -p --permission-mode plan "describe the task" — which is useful if you're calling Claude Code from CI or a script and want it to only propose changes rather than apply them automatically.

The general principle: treat "plan-first" as the safe default for shared or production code, and treat "direct execution" as something you opt into deliberately for low-stakes work, rather than the other way around.

# Launch a session that starts directly in plan mode,
# without touching your settings.json
claude --permission-mode plan
# Same thing, scoped to a single prompt inside
# an already-running session
/plan Add rate limiting to the checkout endpoint
# Inside plan mode, a typical prompt:
Add rate limiting to POST /api/checkout, keyed by user ID,
10 requests per minute, return 429 with Retry-After header.
Use whatever cache client already exists in this repo.

Writing plans that are worth reviewing

Plan mode only pays off if the plan itself is legible enough for you to actually evaluate it in a minute or two. A few habits make this go better.

Give Claude enough context to plan well, not just enough to start. If you say "add caching," Claude has to guess at scope. If you say "add caching to the product listing endpoint using the Redis client already configured in lib/cache.ts, with a 5-minute TTL, invalidated on product update," the resulting plan will be sharper and your review will be faster, because there's less ambiguity for Claude to resolve on its own.

Ask Claude to flag its own uncertainty in the plan. You can explicitly prompt: "In the plan, call out anything you're unsure about or any assumption you're making." This surfaces the exact spots where your domain knowledge is more valuable than another round of code search.

Read the file list, not just the prose. The narrative description of a plan is often reasonable-sounding regardless of whether the plan is actually good. The list of files Claude intends to touch is a much better tell — if it says it's going to modify a file you didn't expect, that's worth a question before you approve.

Push back specifically, not generally. "This doesn't look right" produces a vague revision. "Don't add a new dependency — we already have date-fns installed, use that for the date formatting" produces a precise one. Treat plan review like reviewing a design doc from a colleague: specific comments get specific fixes.

Use plan mode to catch scope creep early. If the plan for "fix this bug" includes refactoring three unrelated files "while we're in there," that's the moment to trim it back, not after the diff lands.

Edit the plan directly when a quick note isn't enough. For small wording fixes or reordering steps, typing feedback back to Claude works fine. But if you want to rewrite a chunk of the plan yourself — rephrase a step, delete a section outright — press Ctrl+G to open the plan in your default text editor, make the change, save, and Claude proceeds from your edited version.

A worked example

Say you're asked to add a password-reset flow to an existing app. This is exactly the kind of multi-file, security-sensitive task plan mode is built for.

You enter plan mode and prompt: "Add a password reset flow. Users should be able to request a reset link by email, click it, and set a new password. Use whatever email sending is already configured in this repo."

Claude reads your codebase: your auth routes, your user model, your email client configuration, maybe an existing "magic link" flow if you have one. It comes back with a plan that might look like this:

  • Add a password_reset_tokens table with a hashed token, user ID, and expiry.
  • Add POST /api/auth/reset-request — looks up user by email, generates a token, stores the hash, sends an email via the existing Resend client with a link containing the raw token.
  • Add POST /api/auth/reset-confirm — validates the token against the stored hash, checks expiry, updates the password, deletes the token.
  • Tokens expire after 1 hour and are single-use.
  • Add rate limiting on the request endpoint to prevent email enumeration abuse.

This is the moment plan mode earns its cost. Maybe you notice it's storing a hashed token but the plan doesn't mention what happens to old, unused tokens for the same user when a new reset is requested (you want those invalidated). Maybe you want the email to not reveal whether the address exists in your system, to avoid account enumeration, and the plan as written would leak that. You say so. Claude updates the plan. Only once the security-relevant details are right do you approve — and now the implementation that gets written matches an approach you've actually vetted, rather than one you're discovering column by column in a diff.

Compare that to skipping plan mode: you'd get a working password reset flow on the first pass too, most likely. But you'd be finding the account-enumeration issue during code review of a full diff, or worse, after it ships, rather than during a two-minute conversation before any code existed.

Plan mode and the rest of your Claude Code workflow

Plan mode isn't a replacement for good prompting, project context files, or code review — it's a checkpoint that sits between them. A well-written CLAUDE.md with your project's conventions still matters, because it shapes the quality of the plan Claude proposes, not just the quality of the final code. If your CLAUDE.md already states "we use Zod for all input validation" or "never introduce a new HTTP client, use the existing apiClient wrapper," Claude's plans will respect that from the first draft instead of you having to correct it during review.

It also composes fine with subagents and larger multi-step work. For a big task, you might use plan mode to agree on the overall approach first, then let execution fan out across multiple steps or delegated pieces — the plan becomes the shared reference point for what "correct" looks like, which matters more as a task gets larger and further from something you could hold entirely in your head.

And it doesn't replace testing or review afterward. Plan mode reduces the odds that Claude solves the wrong problem; it doesn't guarantee the code it writes once the plan is approved is bug-free. Treat the approved plan as "the right shape," and still review the actual diff, run your tests, and check edge cases the same way you would with any other change — AI-authored or not.

Common mistakes to avoid

Treating the plan as a rubber stamp. The most common failure mode is skimming the plan, seeing that it's plausible, and approving without really evaluating it. The entire value of plan mode collapses if you approve on autopilot. If you're not going to actually read it, you may as well skip plan mode and review the diff instead — at least then you're reviewing the thing that actually runs.

Under-specifying the task and expecting the plan to fill the gaps perfectly. Plan mode surfaces Claude's assumptions, but if your initial prompt was vague, the plan is doing a lot of guessing, and you'll spend your review cycle correcting basic scope rather than refining a good approach. A better prompt up front means fewer review round-trips.

Using it for everything, including one-line fixes. As covered above, this just adds friction without adding safety, since there's nothing meaningfully risky to catch.

Forgetting you're still in plan mode. If you cycle into plan mode and then get surprised that Claude "isn't doing anything" when you ask it to make a change, check your mode indicator — you likely need to approve the plan or cycle out with Shift+Tab first.

Not iterating on the plan before approving. You're allowed to go back and forth multiple times before approving. People sometimes treat the first plan as final because asking for a revision feels like it's slowing things down — but a second round of plan revision is still cheaper than a round of revising already-written code.

Assuming a spoken boundary during planning is a permanent rule. If you tell Claude mid-conversation "don't touch the billing module" that instruction lives in the conversation context, not as an enforced rule. If the conversation later gets compacted, that boundary can quietly fall out of context. If a boundary genuinely must hold, back it with an actual deny rule in your permissions settings, not just a sentence in the chat.

Expecting plan mode to unlock protected paths. Directories like .git, .claude, and .vscode still prompt for permission even inside plan mode's approval flow — plan mode changes when you're asked, not what's off-limits by default.

Wrapping up

Plan mode is Claude Code's answer to the biggest trust problem in AI-assisted coding: how do you get the speed of an agent that can read and reason across your whole codebase, without losing the ability to catch a bad approach before it becomes a bad diff? The answer is a hard separation between understanding and doing, with a human checkpoint in between, enforced by Claude literally not having write access until you say go.

Use it where the stakes justify the extra round trip — multi-file changes, unfamiliar code, anything touching auth, payments, or data — and skip it for the small stuff where a direct edit and a quick review is faster. Like most things in working with AI agents, the skill isn't in knowing the feature exists; it's in knowing when to reach for it.

If you want to go deeper on Claude Code itself — how its modes work, how to structure CLAUDE.md files, how to combine plan mode with subagents and hooks for bigger projects — that's exactly what we cover hands-on in our Claude Code Tutorial for Beginners course, where we build up from single-file edits to full agentic workflows step by step.