Skip to content
CCAR-F Prep

Task Statement 3.4·Domain 3 — 20% of exam

Plan Mode vs Direct Execution

Determine when to use plan mode vs direct execution

Jump to practice →

Official Exam Guide Objectives

The objectives below are quoted from Anthropic's Claude Certified Architect – Foundations exam guide, v1.1. Read the exam guide summary for the full blueprint.

Knowledge of

  • Plan mode is designed for complex tasks involving large-scale changes, multiple valid approaches, architectural decisions, and multi-file modifications
  • Direct execution is appropriate for simple, well-scoped changes (e.g., adding a single validation check to one function)
  • Plan mode enables safe codebase exploration and design before committing to changes, preventing costly rework
  • The Explore subagent for isolating verbose discovery output and returning summaries to preserve main conversation context

Skills in

  • Selecting plan mode for tasks with architectural implications (e.g., microservice restructuring, library migrations affecting 45+ files, choosing between integration approaches with different infrastructure requirements)
  • Selecting direct execution for well-understood changes with clear scope (e.g., a single-file bug fix with a clear stack trace, adding a date validation conditional)
  • Using the Explore subagent for verbose discovery phases to prevent context window exhaustion during multi-phase tasks
  • Combining plan mode for investigation with direct execution for implementation (e.g., planning a library migration, then executing the planned approach)

What You Need to Know

Claude Code offers two ways into a task: plan first, or start changing things. The exam asks you to choose between them on the evidence in the scenario, and the criteria are firm enough that it is not a judgement call about personal style.

Plan Mode: When to Use It

Plan mode buys you exploration and design before anything is written to disk. Reach for it when:

  • Large-scale changes are involved. Splitting a monolith, reorganising how modules relate, or replacing a core abstraction all depend on understanding what exists before touching it.
  • Multiple valid approaches exist. Where several designs would work and differ in what they demand of the infrastructure, choosing between them is itself the task.
  • Architectural decisions are required. Service boundaries, dependency direction, API contracts — decisions that later work is built on top of, so getting them wrong is expensive to unwind.
  • Multi-file modifications are needed. A migration touching 45+ files needs one strategy applied uniformly; without it the first ten files and the last ten diverge.
  • Codebase exploration is necessary. Where dependencies, data flow or existing structure have to be established before a change can be designed sensibly.

Throughout, nothing is modified. Claude reads, traces dependencies and proposes — which is what makes exploration safe enough to do thoroughly.

Direct Execution: When to Use It

Direct execution goes straight to the change. Reach for it when:

  • The change is well-scoped. A bug with a stack trace pointing at one function. A date validation to add. A configuration value to update.
  • The correct approach is already known. The what, the where and the how are all settled, and no design decision remains.
  • The scope is limited. One function, one file, one modification whose consequences are contained.

There is nothing to plan in these cases, so planning is pure overhead — a phase that produces a document nobody needed before making the change everyone already agreed on.

The whole decision reduces to one question: is the approach already determined? If there is more than one reasonable way to make the change, or you do not yet know what the change touches, plan. If neither is true, execute. Stakes do not change the answer either: a high-stakes change whose cause, location and fix are all agreed is still direct execution, because a plan would only restate what is already settled. Put briefly, plan mode is for deciding what to do; direct execution is for doing it.

Ambiguity decides, not difficulty A null pointer exception at line 42 is difficult to trace under pressure, but the stack trace names one function and the cause is already known — nothing remains to design, so it is direct execution. Adding a caching layer in front of the orders API sounds easy, but it could reasonably be built as a TTL cache, a write-through cache, or a read-through cache, each with different infrastructure demands — three plausible designs across several modules, so it is plan mode. The two cases sit at opposite corners: hard-but-clear goes straight to the fix, easy-but-uncertain goes to a plan first. Ambiguity decides which mode applies, not how difficult the task looks. null pointer, line 42 difficulty easy hard clear trace, one function, known cause ✓ direct execution hard, but not uncertain add a caching layer difficulty easy hard three plausible designs: TTL cache, write-through, or read-through ✓ plan mode ambiguity decides, not difficulty
1 / 6Swipe diagram ↔

Ambiguity decides, not difficulty, step 1: A null pointer at line 42, one function

File Count Is Not the Criterion

The guide lists multi-file modifications among the marks of plan-mode work, and its examples are wide (a library migration affecting 45+ files). But width is a symptom, not the test, and no documented file-count threshold exists.

  • Wide but mechanical → direct. Renaming one symbol across 30 files has one approach and nothing to decide; you could describe the whole diff in a sentence.
  • Narrow but undecided → plan. A one-file change with two defensible implementations, which the rest of the codebase will then copy, deserves a plan.

On the exam, a stem that pairs many files with decisions (service boundaries, migration strategy, which integration approach) is plan mode. A stem that stresses the change is mechanical and already agreed is not, however many files it touches.

The Explore Subagent

Discovery is verbose. Mapping a codebase produces file listings, dependency graphs, excerpts and working notes, and all of it is valuable for about as long as it takes to reach a conclusion. Left in the main conversation, it occupies the context that implementation is going to need.

The Explore subagent:

  1. Runs the exploration in isolation
  2. Produces summaries of its findings
  3. Returns those summaries to the main conversation
  4. Keeps the main context window clean for the actual implementation work

The pattern fits any multi-phase task where discovery is noisy and the phase after it needs room to think. Asked to "find every call site of processRefund and the modules that re-export it", Explore does the dozens of searches and file reads itself and hands back a short summary with file and line references; done inline, the same work would consume a large share of the window before planning had even started.

Read-only, isolated — only the summary comes back A request to map the src/api/ module for dependencies and patterns goes to the Explore subagent, a built-in, read-only agent with Write and Edit explicitly denied and a thoroughness level of quick, medium, or very thorough. Discovery is verbose — file listings, a dependency graph, code excerpts — and all of it accumulates inside Explore's isolated context rather than the main conversation. Whatever Explore finds, it cannot write or edit anything itself. When it finishes, only a concise summary crosses back into the main conversation; the verbose listings and excerpts stay contained inside the subagent. The main context window stays clean, with room for the implementation phase that follows. main conversation map src/api/ — dependencies, patterns Explore subagent Write ✕ Edit ✕ thoroughness: very thorough file listings dependency graph code excerpts verbose — and contained here read-only — cannot Write or Edit, whatever it finds ✓ summary only main context stays clean — room for implementation
1 / 6Swipe diagram ↔

Read-only, isolated — only the summary comes back, step 1: Main conversation: map src/api/ — dependencies, patterns

Plan mode and Explore protect different things

The two are easily confused because both are "read-only exploration". They solve different problems:

Plan modeExplore subagent
What it protectsThe codebase: no source edits until you approve a planThe context window: verbose discovery output stays in the subagent
ScopeThe whole session, until you approveOne delegated discovery task
OutputA plan you approveA summary returned to the main conversation as soon as it finishes
Can it edit?Not before approvalNever; whatever it notices comes back as a finding, not a change

They combine rather than compete: plan mode for the session, with Explore doing the verbose search-and-read work of the discovery phase, is the strongest setup for a large migration. A stem whose problem is context exhaustion during discovery wants Explore; plan mode alone would leave every listing in the main window.

Two consequences of how Explore runs (details in the Deep Dive) also turn up in questions. It does not load your CLAUDE.md, so its findings will not follow your project conventions, and a forked skill that runs with agent: Explore works without them too. And it is one-shot, so work that must be picked up again later belongs to a general-purpose or custom subagent.

The Hybrid Approach: Plan Then Execute

Most substantial work uses both, in sequence, and the exam tests whether you recognise it:

  1. Plan phase: Use plan mode to explore the codebase, understand dependencies, evaluate approaches, and design the implementation strategy.
  2. Execute phase: Switch to direct execution to implement the planned approach, file by file, with the strategy already decided.

Take swapping one logging library for another across 30 files:

  • Plan: find every file importing the old library (the verbose search is a job for Explore), work out where the two APIs differ, compare the candidate migration strategies, settle on one shape and an order to apply it in, and identify the calls that will not translate cleanly. You approve the plan.
  • Execute: apply that shape file by file, running the tests after each module, with no decisions left to make and no reopening of the approach.

The point is the ordering. Options offering plan mode or direct execution as alternatives are missing the pattern — for work like this the answer uses both, in that order.

Plan then execute — not plan or execute Swapping one logging library for another across thirty files runs as two phases in sequence. The plan phase finds every file importing the old library, maps where the two APIs differ, and settles on a single migration shape, with no files modified throughout. That same shape then carries into the execute phase, where direct execution applies it file by file — the same pattern landing in every file, because no decision is left to make by the time execution starts. Options that treat plan mode and direct execution as alternatives miss this: for a migration like this, the answer uses both, in that order. Plan no files modified find every file importing the old library 30 files found map API differences, settle on one shape migration shape Execute migration shape applied file by file: ✓ ✓ ✓ ✓ ✓ …30 files, one shape no decisions left to make plan THEN execute — not plan OR execute
1 / 6Swipe diagram ↔

Plan then execute — not plan or execute, step 1: Plan phase — no files modified

What has to be true at the switch

The switch to execution comes when the migration pattern is fully settled. Three ways of blurring the boundary each bring back the drift the plan exists to prevent:

  • Migrating the first few files during the plan phase "as a worked example": those files set the precedent instead of the plan.
  • Overlapping the phases, editing early files while API differences are still being mapped: a difference found late invalidates the files already changed.
  • Approving a fresh plan for each file: it adds an approval cycle to a decision already made once, and reopens the settled pattern to per-file variation.

This is the same shape as the hybrid in task 1.6: plan adaptively, then execute as a chain.

Decision Framework Summary

Task characteristicsModeWhy
Architectural restructuring (monolith to microservices)Plan modeService boundaries and dependencies are the decisions; dozens of files
Library migration (many files)Plan mode (then direct execution)Several migration strategies; wide blast radius
Choosing between integration approaches with different infrastructure requirementsPlan modeThe decision is the work
Introducing a caching layerPlan modePlacement, invalidation strategy and failure modes are all open
Multiple valid implementation approachesPlan modeChoosing between them is the task
Codebase exploration needed ("explore this unfamiliar service and document it")Plan mode (with Explore subagent)Discovery dominates; nothing can be designed until it is done
Fixing a flaky or intermittent test whose cause is unknownPlan mode: investigate firstCause unknown means approach undetermined
Single-file bug fix with clear stack traceDirect executionOne obvious fix; scope known
Adding a validation check to one functionDirect executionWell-scoped, single function
Renaming a symbol across 30 filesDirect executionWide but mechanical; no decisions
Adding a test for an existing functionDirect executionScope known
Configuration value updateDirect executionNothing to design
Known fix, known location, known approachDirect executionThe approach is already determined

Recognising Complexity Upfront

One trap recurs: beginning in direct execution and reaching for plan mode once the work turns out to be complicated. Where the requirement already announces the complexity — "restructure the monolith into microservices" leaves nothing to discover about scale — the decision was available before any file was opened. Switching later means the exploration happens after some changes have already landed, which is the expensive order to do it in.

Deep Dive

Three ways to enter plan mode

Plan mode is entered by pressing Shift+Tab, by prefixing a single prompt with /plan, or by starting the CLI directly in plan mode with claude --permission-mode plan. Shift+Tab actually cycles through all enabled permission modes — default (labelled "Manual" in the mode indicator), acceptEdits, plan, and any optional modes you've enabled such as auto or bypassPermissions. While plan mode is active, the status bar shows a ⏸ plan mode on indicator.

Sourcecode.claude.com › permission-modesfetched 2026-07-30

What plan mode actually restricts

Plan mode has Claude research and propose changes without making them: it reads files and runs read-only shell commands to explore, then writes a plan — but does not edit source. Except in sessions where bypass permissions is available, edits stay blocked until the plan is approved.

Sourcecode.claude.com › permission-modesfetched 2026-07-30

The approval flow

Once the plan is ready, Claude asks how to proceed. The documented first option is "Yes, and use auto mode", which approves the plan and starts in auto mode; the other options vary by session. Typically they let you approve but review each edit individually ("Yes, manually approve edits") or stay in plan mode with your feedback so you can redirect Claude ("No, keep planning"). Approving a plan exits plan mode and switches the session to whichever permission mode the chosen option describes. You can also press Ctrl+G to open the proposed plan directly in your text editor before Claude proceeds, or press Shift+Tab again to leave plan mode without approving anything.

Sourcecode.claude.com › permission-modesfetched 2026-11-19

Permission modes compared

ModeRuns without asking
defaultReads only
acceptEditsReads, edits, and common filesystem commands
planReads, plus classifier-approved commands when auto mode is available
autoEverything, with safety checks
dontAskOnly pre-approved tools
bypassPermissionsEverything (explicit ask rules and the destructive-command circuit breaker still prompt)

defaultMode: "plan" under permissions in .claude/settings.json makes plan mode the project default.

Sourcecode.claude.com › permission-modesfetched 2026-07-30

The Explore subagent, precisely

Explore is a built-in, fast, read-only agent optimised for searching and analysing codebases; Write and Edit are explicitly denied to it. Claude invokes it with a thoroughness level — quick, medium, or very thorough — matching the scope of the discovery task. It runs on the parent conversation's model, so it is not a stronger analysis model; what it buys is isolation and read-only scope.

Explore and the built-in Plan subagent are the two exceptions to how subagents load context. The docs: "Explore and Plan start without your CLAUDE.md files and the git status snapshot … Other built-in and custom subagents load both, unless you set omitClaudeMd." So Explore is not the only subagent that can run without CLAUDE.md, but it is one of the two that do so by default. Both are also one-shot: they return no agent ID, so they cannot be resumed. When a later step needs to continue a subagent's work, use general-purpose or a custom subagent.

Sourcecode.claude.com › sub-agentsfetched 2026-11-19

Why plan mode exists: separating exploration from execution

Letting Claude jump straight to coding can produce code that solves the wrong problem — the documented rationale for plan mode is to separate exploration from execution. Planning is most useful when you're uncertain about the approach, the change touches multiple files, or you're unfamiliar with the code being modified; if you could describe the diff in one sentence, skip the plan. The recommended four-phase workflow is Explore → Plan → Implement → Commit.

Sourcecode.claude.com › best-practicesfetched 2026-07-30

Quick Reference

ItemValue / behaviour
The deciding questionIs the approach already determined? No (or scope unknown) → plan; yes → direct
Not the criterionDifficulty, stakes, or file count on its own
Enter plan modeShift+Tab, /plan prefix, or claude --permission-mode plan
Plan mode in the Agent SDKpermission_mode="plan" in ClaudeAgentOptions (Python)
Plan mode restrictsedits (reads and read-only exploration only), until approved
Approve: auto mode"Yes, and use auto mode" — the first option; the rest vary by session
Approve: manual"Yes, manually approve edits" — review each edit
Reject"No, keep planning" — stays in plan mode
Edit the plan directlyCtrl+G opens it in your text editor
Leave without approvingShift+Tab again
Project default plan modepermissions.defaultMode: "plan" in .claude/settings.json (a defaultMode of auto or bypassPermissions is ignored in project and local settings)
Permission modesdefault (reads only) · acceptEdits (reads + edits + common filesystem commands) · plan (reads, plus classifier-approved commands when auto mode is available) · auto (everything, with safety checks) · dontAsk (pre-approved tools only — more restrictive than auto) · bypassPermissions (everything; explicit ask rules and the destructive-command circuit breaker still prompt)
Plan mode vs Exploreplan mode protects the codebase; Explore protects the context window
Explore subagentread-only, denies Write/Edit; parent conversation's model; thoroughness: quick / medium / very thorough
Explore & Plan vs other subagentsstart without CLAUDE.md and git status; others load both unless omitClaudeMd is set
Resuming Explore or Plannot possible: one-shot, no agent ID; use general-purpose or a custom subagent
Recommended workflowExplore → Plan → Implement → Commit
Skip planning whenyou could describe the diff in one sentence

Exam Traps

More wrong answers, and why each fails

Tempting answerWhy it failsChoose instead
Stay in plan mode throughout the migration, implementation includedWrong for the same reason as "start direct and switch later": each phase has its own right mode. Plan mode decides; it does not apply the changeApprove the plan, then execute it directly

How This Is Tested

Stem signalAnswerWrong-answer pattern beside it
Monolith to microservices, dozens of files, decisions about service boundaries and module dependenciesPlan mode from the startStart direct and switch if complexity appears; let implementation reveal the boundaries; detailed upfront instructions
Single-file bug fix with a clear stack trace, or one date validation conditionalDirect executionPlan mode because the bug is hard or the code path is critical
Library migration affecting 45+ files, then implement itPlan mode for investigation, then direct executionEither mode on its own; staying in plan mode throughout
Two integration approaches with different infrastructure requirementsPlan modePick one directly and refactor later if it proves wrong
A multi-phase task is exhausting the context window during discoveryExplore subagent for the discovery phaseKeep discovering inline; plan mode alone (it protects the codebase, not the context)
A rename across 30 files whose approach is agreedDirect executionPlan mode because many files are involved

Official sample question 5, option by option

The stem: "You've been assigned to restructure the team's monolithic application into microservices. This will involve changes across dozens of files and requires decisions about service boundaries and module dependencies. Which approach should you take?"

OptionVerdictThe official explanation
A. "Enter plan mode to explore the codebase, understand dependencies, and design an implementation approach before making changes."Correct"Plan mode is designed for complex tasks involving large-scale changes, multiple valid approaches, and architectural decisions—exactly what monolith-to-microservices restructuring requires. It enables safe codebase exploration and design before committing to changes."
B. "Start with direct execution and make changes incrementally, letting the implementation reveal the natural service boundaries."WrongIt "risks costly rework when dependencies are discovered late."
C. "Use direct execution with comprehensive upfront instructions detailing exactly how each service should be structured."WrongIt "assumes you already know the right structure without exploring the code."
D. "Begin in direct execution mode and only switch to plan mode if you encounter unexpected complexity during implementation."WrongIt "ignores that the complexity is already stated in the requirements, not something that might emerge later."

Every wrong option starts in direct execution, and each fails differently. B treats finding the boundaries, which is the design problem itself, as a side effect of coding. C presumes the answer: detailed instructions are only as good as a structure nobody has yet worked out from the code. D is the trap, because "escalate if needed" sounds pragmatic; it is wrong whenever the stem has already described the complexity, as "dozens of files" and "decisions about service boundaries" do here.

Practice Scenario

A race condition in the payment reconciliation job has been the hardest bug your team has hit this quarter. You now have a failing test that reproduces it, a stack trace, and agreement on the single function at fault and the fix it needs. A developer argues that a bug this hard should go through plan mode before anything is touched. Which approach should you take?

Practice Questions

Exam simulator

Question 1 of 13

Scenario · Code Generation with Claude Code

A config key, retryLimit, is being renamed to maxRetries across 30 files. The mapping is exact, nothing else changes, and the test suite covers every call site. A colleague insists on plan mode because the change touches more than ten files. Which approach should you take?

Sources