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.

Lesson 16 of 3053% of the guide
Prefer to learn by doing?

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.

TaskRecommended mode
Architectural restructuringPlan mode
Multi-file library migrationPlan mode -> direct execution
Multiple implementation approachesPlan mode
Single-file bug, clear stack traceDirect execution
Known fix, known location, known approachDirect execution
Ambiguity, not difficulty

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.

A multi-file library migration
Don't

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.

Do

Use plan-then-execute: plan the API differences and migration pattern once, then apply that decided approach file by file with direct execution.

Don't discover complexity mid-flight

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 is read-only

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.

  1. The trap

    Use direct execution for a multi-file architectural restructuring to get moving faster.

    Correct answer

    Use 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.

  2. The trap

    Use plan mode for a single-function bug with a clear stack trace to be safe.

    Correct answer

    Use 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.

  3. The trap

    Start a stated-complex migration in direct execution and switch to plan mode if complexity emerges.

    Correct answer

    Choose 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.

Practice makes pass

Ready to test what you just learned?

Reading gets you familiar — answering questions gets you certified. Jump into free practice or sit a full timed mock exam, scored 100–1000 just like the real thing.

No sign-up required · Explanation for every answer · Works offline