Plan mode changes the deal: Claude explores your code read-only and hands you a written plan before it touches a single file. It reads, it thinks, it proposes the steps it would take. It does not edit, run mutating commands, or create anything until you approve the plan.
It is a two-step loop instead of one:
You get a look under the hood before the work happens, which is exactly when a mistake is cheapest to catch.
Headless, pass the permission mode on the command line:
claude -p --permission-mode plan "Add retry logic to the API client"
Claude responds with a plan instead of edits. In the interactive console, use the mode toggle: press Shift+Tab to cycle into plan mode, then prompt as normal and review the plan it returns.
Plan mode is not for every one-line tweak. It pays off when the cost of a wrong move is high:
For a quick, well-understood edit, plan mode just adds a step. For anything big, risky, or unfamiliar, reading the plan first is the cheap insurance.
Your lab setup
This VM comes with Claude Code preinstalled and signed in - just run claude to start.