What you need to know
Plan mode
In plan mode Claude reads and explores but does not edit files or run changing commands. It produces a plan for you to review. That makes it safe to investigate a codebase and agree on a design before any change is made, which prevents expensive rework.
Choosing
| Use plan mode for | Use direct execution for |
|---|---|
| Large-scale changes across many files | A single-file bug fix with a clear stack trace |
| Several valid approaches to choose between | Adding one validation check to one function |
| Architectural decisions (service boundaries, API contracts) | A well-understood change with a clear scope |
| Library or framework migrations (45+ files) | Renaming a local variable |
| Integrations with different infrastructure needs | Fixing a typo in a comment |
The test is uncertainty and blast radius. If you could describe the exact change in a sentence and it touches one place, execute. If the right approach is not yet clear, or a wrong start would mean undoing dozens of files, plan first.
Plan, then execute
The modes combine. A library migration is planned (explore usages, choose a strategy, agree the order) and then executed directly, following the agreed plan.
The Explore subagent
Discovery is noisy: Grep results, file listings, dependency traces. In a multi-phase task, that output can fill the main context before implementation starts. The built-in Explore subagent does the discovery in its own context and returns a summary, so the main conversation reaches the implementation phase with room to work.
In the exam
Many questions present two tasks side by side (a small fix and a large migration) and ask for the right mode for each. Others describe context running out during a long discovery phase, which points to the Explore subagent.
Check your understanding
You must (1) fix an off-by-one error at a known line and (2) migrate 45 route handlers from Express to Fastify. What do you use?
Show answer
Answer: C. The fix is clear and local, so execute it. The migration is wide and has several valid strategies, so plan it first.
During a long task, discovery output fills the context before implementation begins. What helps most?
Show answer
Answer: D. The Explore subagent keeps verbose discovery in its own context and returns a summary, leaving the main context free for implementation.
Which TWO tasks call for plan mode? Select TWO.
Show answer
Answer: A, C. Architectural decisions and wide migrations benefit from exploration and agreement before changes. The other two are small, clear and local.
Apply it: Harbor Lane's mode guide
Harbor Lane abandoned its Express to Fastify migration halfway. Write a one-page guide to choosing modes, using the case's upcoming work.
- Classify each upcoming item: the date library upgrade (120 files), the audit-log feature, and the weekly small bug fixes.
- Describe the migration flow from plan to execution in three or four steps.
- Say where the Explore subagent fits.
Show model answer
1. Classification
| Work | Mode | Why |
|---|---|---|
| Date library upgrade, 120 files | Plan, then execute | Wide blast radius; strategy (codemod or by hand, order of packages) must be agreed |
| Audit-log feature | Plan, then execute | Unfamiliar domain and design choices (what to log, where to store it) |
| Small known bugs | Direct execution | Clear cause, one place, easy to verify |
2. Migration flow
- In plan mode, find every usage and group them by pattern.
- Choose the strategy and the order (shared first, then web), and agree it.
- Exit plan mode and execute one package at a time, running tests after each.
- Return to plan mode only if a new pattern appears that the plan did not cover.
3. Explore. Step 1 of the flow: send usage discovery to the Explore subagent so the hundreds of matches stay out of the main session and only the grouped summary returns.