Plan mode

Claude Code · Practical · 10 min

Planning first prevents the most expensive failure: confidently solving the wrong problem across many files.

In plan mode Claude reads files, searches and asks you questions, but does not edit your source files. When it has enough context it presents a plan: which files change, in what order, and how it will verify the result.

Ways in:

  • press Shift+Tab until the status bar says plan mode,
  • prefix one prompt with /plan, for example /plan add Google OAuth login,
  • start with claude --permission-mode plan.

When the plan appears you choose how to proceed: approve it (which switches to an editing mode so Claude starts implementing) or keep planning and say what to change. Press Ctrl+G to open the plan in your text editor and edit it directly before approving. To plan again later, cycle back with Shift+Tab or use /plan.

When it pays off: the change touches several files, you are unsure of the approach, or you do not know this part of the code. When to skip it: if you could describe the diff in one sentence (rename a variable, fix a typo), planning is just overhead.

Tips for better plans:

  • Give the goal and constraints, not step-by-step instructions: "add rate limiting to the public API; don't add new dependencies".
  • Ask for the verification step: "include how you'll test it".
  • Push back on the plan; it is cheap to change now and expensive after edits.

For big features, a useful variant is to let Claude interview you with questions, write a spec file, then start a fresh session that implements the spec with clean context.

Example

$ claude --permission-mode plan
> read src/auth and explain how sessions and login work today
> I want to add Google OAuth. What files change? What's the session flow?
  Include how you'll test it.
  (Claude presents a plan)
  Ctrl+G       # edit the plan in your editor
  -> approve   # leaves plan mode; Claude starts implementing
> implement the plan, write tests for the callback handler, run them

Remember

  • Plan mode researches and proposes without editing your source files
  • Enter with Shift+Tab, /plan, or --permission-mode plan; Ctrl+G edits the plan
  • Use it for multi-file or uncertain work; skip it for one-line changes

Watch out for

  • Approving a vague plan without reading it, which gives you the same wrong solution, just later.

Check yourself

  1. Which task most benefits from plan mode?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: code.claude.com/docs/en/permission-modes