Claude CodeClaude Code 2.1 · macOS, Linux, Windows
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
31 small wins to finish your pathNext lesson

Plan before it writes

The cheapest correction is the one made before anything is written. Plan mode is the tool asking you to check its thinking first.

In plan mode it does everything except change your source: it reads files, runs commands to explore, and writes out what it intends to do. Edits stay blocked until you approve the plan.

Turning it on

Three ways in, and they all reach the same place. Press Shift+Tab in a session until the status bar reads plan mode on. Prefix a single prompt with /plan when only that one prompt needs it. Or start the whole session in it.

bash
claude -p "Plan how you would add tests for shorten.py. Do not write any files." \
  --permission-mode plan
Captured from a real run
Plan complete. Ready for review.

Drafted comprehensive test plan for shorten.py covering:
- **next_code()**: Code sequence generation (a0, a1...z0, z1, etc.)
- **shorten()**: URL shortening with store.save() calls
- **expand()**: URL retrieval with store.find()
- **Integration test**: End-to-end roundtrip validation

Uses pytest + mocked store for isolation. ~12 unit tests + 1 integration test planned.

Plan at `/Users/you/.claude/plans/plan-how-you-would-swift-dijkstra.md` ready for approval.

Two things happened there and neither one was an edit. It read the project well enough to name the three functions, and it wrote the plan to a file of its own rather than to your repository. Nothing in the project changed.

Reading a plan properly

A plan is worth more than the code it produces, because it is short enough to actually read. The questions worth asking are always the same three.

  • Is it solving the problem you have, or a nearby one that is easier?
  • Does it touch files you did not expect? That is usually a misunderstanding, not ambition.
  • Does it say how it will check the work? A plan with no verification step produces code nobody has run.

The plan above fails the first test, quietly. Twelve tests and ninety five per cent coverage on a twenty line file is more than this project needs, and none of it mentions the bug from lesson 0. That is worth saying back before approving, and saying it is cheaper now than after the tests exist.

Approving

When the plan is ready it asks how to proceed. You can approve it and let it start editing, approve it and switch the session to auto mode, or keep planning and tell it what to change. Approving leaves plan mode, which is the point: planning is a phase, not a setting you live in.

In the session
Press Ctrl+G at the approval prompt to open the plan in your own editor and change it before Claude runs it. Editing one line of a plan is the highest leverage keystroke in the whole tool.
A plan is a proposal
Plan mode does not make it truthful. It can plan something that will not work. What it buys you is a cheap look at the intention before the diff exists, and a chance to say no while saying no is still free.
Try it yourself
  • Ask for a plan, reject it, and say what was wrong. Read the second plan.
  • Ask for a plan on something you already know how to do, and see whether it agrees with you.

Every expert started right here.