Plan Mode & Execution
Choose plan mode or direct execution by ambiguity, not difficulty — and know the plan-then-execute hybrid the exam loves to test.
Claude Code can either design before it edits (plan mode) or change files right away (direct execution). The deciding factor is task ambiguity, not difficulty. A gnarly bug with a clear stack trace is well-defined and belongs in direct execution; a small feature with several viable designs is ambiguous and belongs in plan mode.
When to use plan mode
Plan mode reads the codebase, analyzes dependencies, and proposes an approach without modifying any files. Reach for it when you need exploration and strategy before touching code:
- Large-scale restructuring, like splitting a monolith into services or reorganizing a module system.
- Several valid approaches with distinct tradeoffs that need evaluation.
- Architectural decisions such as service boundaries or API contracts with downstream consequences.
- Multi-file changes where consistency across many files needs one unified strategy.
- Dependency mapping, where data flows must be understood before it is safe to change anything.
When to use direct execution
Direct execution skips planning and makes the change immediately. For small, well-understood work, planning adds nothing: single-file bug fixes with a clear stack trace, known solutions that need no design decisions, or a config tweak and a validation conditional.
The Explore subagent
During planning, the Explore subagent runs discovery in isolation and returns focused summaries, so verbose file-reading output never floods the main context window. This preserves context quality for the implementation phase that follows.
The plan-then-execute hybrid
The exam specifically tests a two-phase pattern. First plan: explore dependencies, weigh approaches, and design the strategy. Then execute: implement with direct execution using the approach you already decided. A library migration across 30 files is the classic case — plan the API differences and migration pattern once, then apply it file by file.
| Task | Recommended mode |
|---|---|
| Architectural restructuring | Plan mode |
| Multi-file library migration | Plan mode -> direct execution |
| Multiple implementation approaches | Plan mode |
| Single-file bug, clear stack trace | Direct execution |
| Known fix, known location, known approach | Direct execution |
Hard-but-clear work goes to direct execution; easy-but-ambiguous work goes to plan mode. When complexity is already stated in the requirements, choose plan mode up front.
Start the 30-file migration in direct execution and switch to plan mode only once tangled dependencies surface — risking costly rework of files you already touched.
Use plan-then-execute: plan the API differences and migration pattern once, then apply that decided approach file by file with direct execution.
Starting a monolith refactor in direct execution and switching to plan mode once dependencies surface risks costly rework. If the requirements already state the scale, pick plan mode from the start.
Plan mode proposes an approach without editing files, so it is a safe way to scope risky changes before committing to them.
How the exam will try to trick you
The distractors below look right under time pressure — learn the tell.
- The trap
Use direct execution for a multi-file architectural restructuring to get moving faster.
Correct answerUse plan mode for restructuring where several valid approaches and cross-file dependencies exist.
Why: Direct execution risks costly rework once dependencies surface late in the change.
- The trap
Use plan mode for a single-function bug with a clear stack trace to be safe.
Correct answerUse direct execution — a known cause and known location need no design phase.
Why: Planning a well-defined fix only adds overhead; ambiguity, not difficulty, calls for plan mode.
- The trap
Start a stated-complex migration in direct execution and switch to plan mode if complexity emerges.
Correct answerChoose plan mode up front when the requirements already state the scale, then execute the decided approach file by file.
Why: The complexity is known, not speculative, so discovering it mid-flight just wastes work already done.
Key takeaways
- Choose modes by task ambiguity, not difficulty.
- Plan mode explores and proposes without modifying files.
- Direct execution suits small, well-defined, known-solution changes.
- The Explore subagent isolates discovery to protect context.
- Plan-then-execute is the standard pattern for multi-file migrations.
- If requirements already state the complexity, pick plan mode up front.
Frequently asked questions
What is plan mode in Claude Code?+
Plan mode has Claude read the codebase, analyze dependencies, and propose an approach without editing any files. It is meant for ambiguous or large-scope work where strategy should be settled before changes begin.
Should I use plan mode or direct execution?+
Decide by ambiguity. Well-defined changes, even hard ones like a bug with a clear stack trace, suit direct execution. Ambiguous work with multiple designs, architectural impact, or many files suits plan mode, often followed by direct execution.