Task Statement 3.4·Domain 3 — 20% of exam
Plan Mode vs Direct Execution
Determine when to use plan mode vs direct execution
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, 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:
- Runs the exploration in isolation
- Produces summaries of its findings
- Returns those summaries to the main conversation
- 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, 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 mode | Explore subagent | |
|---|---|---|
| What it protects | The codebase: no source edits until you approve a plan | The context window: verbose discovery output stays in the subagent |
| Scope | The whole session, until you approve | One delegated discovery task |
| Output | A plan you approve | A summary returned to the main conversation as soon as it finishes |
| Can it edit? | Not before approval | Never; 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:
- Plan phase: Use plan mode to explore the codebase, understand dependencies, evaluate approaches, and design the implementation strategy.
- 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, 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 characteristics | Mode | Why |
|---|---|---|
| Architectural restructuring (monolith to microservices) | Plan mode | Service 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 requirements | Plan mode | The decision is the work |
| Introducing a caching layer | Plan mode | Placement, invalidation strategy and failure modes are all open |
| Multiple valid implementation approaches | Plan mode | Choosing 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 unknown | Plan mode: investigate first | Cause unknown means approach undetermined |
| Single-file bug fix with clear stack trace | Direct execution | One obvious fix; scope known |
| Adding a validation check to one function | Direct execution | Well-scoped, single function |
| Renaming a symbol across 30 files | Direct execution | Wide but mechanical; no decisions |
| Adding a test for an existing function | Direct execution | Scope known |
| Configuration value update | Direct execution | Nothing to design |
| Known fix, known location, known approach | Direct execution | The 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
| Mode | Runs without asking |
|---|---|
default | Reads only |
acceptEdits | Reads, edits, and common filesystem commands |
plan | Reads, plus classifier-approved commands when auto mode is available |
auto | Everything, with safety checks |
dontAsk | Only pre-approved tools |
bypassPermissions | Everything (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
| Item | Value / behaviour |
|---|---|
| The deciding question | Is the approach already determined? No (or scope unknown) → plan; yes → direct |
| Not the criterion | Difficulty, stakes, or file count on its own |
| Enter plan mode | Shift+Tab, /plan prefix, or claude --permission-mode plan |
| Plan mode in the Agent SDK | permission_mode="plan" in ClaudeAgentOptions (Python) |
| Plan mode restricts | edits (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 directly | Ctrl+G opens it in your text editor |
| Leave without approving | Shift+Tab again |
| Project default plan mode | permissions.defaultMode: "plan" in .claude/settings.json (a defaultMode of auto or bypassPermissions is ignored in project and local settings) |
| Permission modes | default (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 Explore | plan mode protects the codebase; Explore protects the context window |
| Explore subagent | read-only, denies Write/Edit; parent conversation's model; thoroughness: quick / medium / very thorough |
| Explore & Plan vs other subagents | start without CLAUDE.md and git status; others load both unless omitClaudeMd is set |
| Resuming Explore or Plan | not possible: one-shot, no agent ID; use general-purpose or a custom subagent |
| Recommended workflow | Explore → Plan → Implement → Commit |
| Skip planning when | you could describe the diff in one sentence |
Exam Traps
More wrong answers, and why each fails
| Tempting answer | Why it fails | Choose instead |
|---|---|---|
| Stay in plan mode throughout the migration, implementation included | Wrong 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 change | Approve the plan, then execute it directly |
How This Is Tested
| Stem signal | Answer | Wrong-answer pattern beside it |
|---|---|---|
| Monolith to microservices, dozens of files, decisions about service boundaries and module dependencies | Plan mode from the start | Start 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 conditional | Direct execution | Plan mode because the bug is hard or the code path is critical |
| Library migration affecting 45+ files, then implement it | Plan mode for investigation, then direct execution | Either mode on its own; staying in plan mode throughout |
| Two integration approaches with different infrastructure requirements | Plan mode | Pick one directly and refactor later if it proves wrong |
| A multi-phase task is exhausting the context window during discovery | Explore subagent for the discovery phase | Keep discovering inline; plan mode alone (it protects the codebase, not the context) |
| A rename across 30 files whose approach is agreed | Direct execution | Plan 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?"
| Option | Verdict | The 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." | Wrong | It "risks costly rework when dependencies are discovered late." |
| C. "Use direct execution with comprehensive upfront instructions detailing exactly how each service should be structured." | Wrong | It "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." | Wrong | It "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
- Claude Code Plan Mode Documentation — Anthropic
- Claude Code Permission Modes Documentation — Anthropic
- Claude Code Subagents Documentation (Explore subagent characteristics) — Anthropic
- Claude Code Best Practices — Anthropic
- Claude Certified Architect Foundations Exam Guide — Task Statement 3.4 — Anthropic
- Claude Certified Architect Foundations Exam Guide — Sample Question 5 — Anthropic