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
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 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.
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, work out where the two APIs differ, settle on the shape of the migration, and identify the calls that will not translate cleanly.
- Execute: apply that shape file by file, with no decisions left to make.
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.
Decision Framework Summary
| Task characteristics | Mode |
|---|---|
| Architectural restructuring | Plan mode |
| Library migration (many files) | Plan mode (then direct execution) |
| Multiple valid implementation approaches | Plan mode |
| Codebase exploration needed | Plan mode (with Explore subagent) |
| Single-file bug fix with clear stack trace | Direct execution |
| Adding a validation check to one function | Direct execution |
| Configuration value update | Direct execution |
| Known fix, known location, known approach | Direct execution |
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 offers a choice: "Yes, and use auto mode" approves and starts in auto mode (reading as "Yes, auto-accept edits" when auto mode isn't available); "Yes, manually approve edits" approves but reviews each edit individually; "No, keep planning" stays in plan mode so you can redirect Claude; and on Claude Code on the web there is a fourth option to refine the plan with Ultraplan. 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-07-30
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. Explore (and the built-in Plan subagent) skip your CLAUDE.md files and the parent session's git status entirely, to keep research fast and inexpensive; every other built-in and custom subagent loads both.
Sourcecode.claude.com › sub-agentsfetched 2026-07-30
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 |
|---|---|
| Enter plan mode | Shift+Tab, /plan prefix, or claude --permission-mode plan |
| Plan mode restricts | edits (reads and read-only exploration only), until approved |
| Approve: auto mode | "Yes, and use auto mode" — auto-accepts edits going forward |
| 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 |
| Permission modes | default (reads only) · acceptEdits (reads + edits + common filesystem commands) · plan (reads + classifier-approved commands) · auto (everything, with safety checks) · dontAsk (pre-approved tools only — more restrictive than auto) · bypassPermissions (everything, no prompts) |
| Explore subagent | read-only, denies Write/Edit; thoroughness: quick / medium / very thorough |
| Explore & Plan vs other subagents | skip CLAUDE.md and git status; all other subagents load both |
| Recommended workflow | Explore → Plan → Implement → Commit |
| Skip planning when | you could describe the diff in one sentence |
Exam Traps
Practice Scenario
Your team faces three tasks: (1) restructure a monolith into microservices, (2) fix a null pointer exception in a single function with a clear stack trace, (3) migrate from one logging library to another across 30 files. Which mode should be used for each?
Build Exercise
Practice Plan Mode vs Direct Execution Decision-Making
Difficulty: Intermediate (2/4)
45 minutes
- Identify a complex multi-file task in a codebase (refactoring, migration, or restructuring) and use plan mode to explore dependencies and design an approach
Why: Plan mode is for tasks with multiple valid approaches, architectural decisions, or multi-file modifications. The exam tests whether you choose plan mode upfront when complexity is stated in the requirements rather than waiting for surprises.
You should see: Claude Code explores the codebase without modifying any files. The output includes: identified dependencies between modules, multiple possible approaches with tradeoffs, and a recommended implementation strategy. No files are changed during the planning phase.
- Identify a simple single-file bug and use direct execution to fix it — observe the efficiency gain over planning
Why: Direct execution is correct when the problem, location, and solution are all clear. The exam tests that you do not over-plan well-understood changes. The decision is about ambiguity, not difficulty.
You should see: Claude Code makes the fix immediately without a planning phase. The change is confined to a single file or function. The total time from prompt to fix is noticeably shorter than the plan mode task above.
- Use the hybrid approach: plan mode to design a migration strategy for a library change across multiple files, then switch to direct execution to implement the plan
Why: The plan-then-execute hybrid is a specific pattern tested on the exam. Plan mode designs the strategy; direct execution applies it consistently. This is the correct approach for tasks like library migrations affecting many files.
You should see: Phase 1 (plan): Claude identifies all files importing the old library, maps API differences, and produces a migration pattern. Phase 2 (execute): Claude applies the migration pattern file by file using the planned approach. The implementation is consistent across all files.
- Use the Explore subagent for a verbose codebase discovery task and observe how it keeps the main conversation context clean
Why: The Explore subagent isolates verbose discovery output so the main conversation context stays focused. Without isolation, extensive file listings and analysis fill the context window and degrade subsequent responses.
You should see: The Explore subagent runs the discovery task and returns a concise summary to the main conversation. The full verbose output (file listings, dependency graphs, code excerpts) is not visible in the main conversation. Subsequent responses in the main conversation remain high quality.
- Create a written decision framework: list your criteria for choosing plan mode vs direct execution, with examples for each
Why: Internalising the decision criteria is essential for the exam. The framework should cover the key distinction: ambiguity determines the mode, not difficulty. A difficult but well-defined fix is direct execution; a simple-sounding feature with multiple approaches is plan mode.
You should see: A clear decision framework with at least four criteria for plan mode and three for direct execution. Each criterion has a concrete example. The framework explicitly addresses the ambiguity-vs-difficulty distinction.
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
Appendix A — Build Exercise Step Hints
Progressive hints revealed by the "Stuck? Get a nudge" control on each step.
Step 1. Identify a complex multi-file task in a codebase (refactoring, migration, or restructuring) and use plan mode to explore dependencies and design an approach
Why: Plan mode is for tasks with multiple valid approaches, architectural decisions, or multi-file modifications. The exam tests whether you choose plan mode upfront when complexity is stated in the requirements rather than waiting for surprises.
You should see: Claude Code explores the codebase without modifying any files. The output includes: identified dependencies between modules, multiple possible approaches with tradeoffs, and a recommended implementation strategy. No files are changed during the planning phase.
Stuck? Get a nudge
Step 2. Identify a simple single-file bug and use direct execution to fix it — observe the efficiency gain over planning
Why: Direct execution is correct when the problem, location, and solution are all clear. The exam tests that you do not over-plan well-understood changes. The decision is about ambiguity, not difficulty.
You should see: Claude Code makes the fix immediately without a planning phase. The change is confined to a single file or function. The total time from prompt to fix is noticeably shorter than the plan mode task above.
Stuck? Get a nudge
Step 3. Use the hybrid approach: plan mode to design a migration strategy for a library change across multiple files, then switch to direct execution to implement the plan
Why: The plan-then-execute hybrid is a specific pattern tested on the exam. Plan mode designs the strategy; direct execution applies it consistently. This is the correct approach for tasks like library migrations affecting many files.
You should see: Phase 1 (plan): Claude identifies all files importing the old library, maps API differences, and produces a migration pattern. Phase 2 (execute): Claude applies the migration pattern file by file using the planned approach. The implementation is consistent across all files.
Stuck? Get a nudge
Step 4. Use the Explore subagent for a verbose codebase discovery task and observe how it keeps the main conversation context clean
Why: The Explore subagent isolates verbose discovery output so the main conversation context stays focused. Without isolation, extensive file listings and analysis fill the context window and degrade subsequent responses.
You should see: The Explore subagent runs the discovery task and returns a concise summary to the main conversation. The full verbose output (file listings, dependency graphs, code excerpts) is not visible in the main conversation. Subsequent responses in the main conversation remain high quality.
Stuck? Get a nudge
Step 5. Create a written decision framework: list your criteria for choosing plan mode vs direct execution, with examples for each
Why: Internalising the decision criteria is essential for the exam. The framework should cover the key distinction: ambiguity determines the mode, not difficulty. A difficult but well-defined fix is direct execution; a simple-sounding feature with multiple approaches is plan mode.
You should see: A clear decision framework with at least four criteria for plan mode and three for direct execution. Each criterion has a concrete example. The framework explicitly addresses the ambiguity-vs-difficulty distinction.
Stuck? Get a nudge
Appendix B — Interactive Study Prompts
Two prompts to paste into Claude. B1 drills the judgement the exam actually measures; B3 reviews the work you produced for the Build Exercise above. The exam simulator between them is the interactive quiz on this page.
B1. Concept Check — Discrimination Drill
You are examining me for the Claude Certified Architect – Foundations (CCAR-F) exam, Domain 3: Claude Code Configuration & Workflows (20% of the exam), Task Statement 3.4: Plan Mode vs Direct Execution. Use British English throughout.
What this exam actually measures. Not one item on the official exam asks what something is. Every item drops you into a production system that is already misbehaving, offers four defensible engineering responses, and asks which is best. The skill being tested is proportionality: fix the root cause with the cheapest instrument that gives the guarantee the situation demands. So do not quiz me on definitions. Make me choose between options that are both defensible, then attack whatever I chose.
How to run this session.
- One question at a time. Stop and wait. Never answer your own question, and never move on until I have committed.
- Never reveal which option is right before I commit to one.
- Do not praise me. A correct answer earns "Yes" and the next question. If I am right for the wrong reason, say so — that is the failure that costs marks on exam day.
- When I am wrong, quote the exact phrase in my answer that gave it away, correct it in one sentence, and move on. One correction at a time.
- If I write something fluent but empty, name it: "That is a restatement, not a reason."
- Set every scenario inside one of the exam's production contexts: Code Generation with Claude Code (a team leaning on custom slash commands, CLAUDE.md configuration, and plan mode versus direct execution), Claude Code for Continuous Integration (automated review, test generation and PR feedback in a pipeline that has to keep false positives down), or Developer Productivity with Claude (an agent over an unfamiliar codebase using the built-in
Read,Write,Bash,Grep,Globtools).
Session plan — about twelve questions.
Round 1 — Anchor (1 question). One concrete question to check I have actually read the material. If I cannot answer it, stop the session and tell me to read the lesson before continuing.
Round 2 — Discrimination (5 questions). Each one: describe a symptom in one of the contexts above, with a number or a concrete observation in it — how many files the change touches, what the stack trace points at, how many approaches the team is arguing between. Offer exactly two responses, both defensible. Ask me to pick one and justify it in a single sentence. Then argue the case for the option I rejected as strongly as you can, and ask whether I am holding or changing my answer. Only after I answer that, tell me which is right and why the other one is the more tempting trap.
Round 3 — Proportionality (2 questions). Take one symptom and run it twice with different stakes: once where getting it wrong costs five minutes of unnecessary planning, once where it costs a half-applied migration sitting across 45 files on a shared branch. The right answer must change between the two. If I answer the same way both times without noticing the stakes moved, that is the finding — tell me.
Round 4 — Code review (3 questions). Present a colleague's confident proposal containing one of the trap errors listed below, written the way a teammate would write it in a pull request. Ask me what is wrong with it. Do not signal that anything is wrong.
Round 5 — Verdict. Rate me green, amber or red on each concept below. Name the single weakness most likely to cost me marks, and give me one specific next action: a section of this lesson to re-read, or a step of the Build Exercise to redo. If I am not ready for this task statement, say so plainly.
Concepts in scope
- What plan mode is for — large-scale changes, several valid approaches, architectural decisions, multi-file modifications, and any work needing codebase exploration first. Claude reads and proposes; source edits stay blocked until the plan is approved, so exploration is safe.
- What direct execution is for — a change whose cause, location and fix are all already known: a single-file bug with a clear stack trace, one validation conditional, one configuration value. Planning adds nothing here.
- Ambiguity decides, not difficulty — a hard bug with a clear stack trace and a known cause is direct execution; an easy-sounding request with three plausible implementations across several modules is plan mode.
- The Explore subagent — a read-only agent, denied Write and Edit, that runs verbose discovery in isolation and hands back a summary, keeping the main context window clear for the implementation that follows.
- Plan then execute — the hybrid pattern: plan mode to map dependencies and design the migration, direct execution to apply that pattern file by file. Plan THEN direct, not plan OR direct.
- Complexity recognised upfront — when the requirement itself states the complexity, plan mode is chosen at the start. The complexity is not going to emerge later; it is already in the request.
Trap errors to plant in Round 4
- Defaulting to direct execution for a multi-file architectural change with several defensible approaches, and discovering the dependencies late.
- Running plan mode over a single-file bug whose stack trace, cause and fix are all already clear.
- Treating the two modes as mutually exclusive and missing the plan-then-execute hybrid on a migration that spans many files.
- Starting in direct execution and switching to plan mode only once complexity shows up, when the requirement stated that complexity from the outset.
Stay inside the material above. If I raise something outside it, tell me it is out of scope for this task statement and return to the drill. Begin with Round 1.
B2. Exam Simulator
Exam simulator
Question 1 of 10
Scenario · Code Generation with Claude Code
Your sprint has three items: restructuring a monolith into services, fixing a null-pointer exception in one function with a clear stack trace, and migrating from one logging library to another across 30 files. You want each handed to Claude in the cheapest mode that still fits. Which approach should you take?
B3. Build Coach — Workflow Review
The Build Exercise and its hint ladder are already on this page. This prompt is for the one thing the page cannot do: review the work you actually produced.
You are a staff engineer reviewing my implementation of a build exercise for the Claude Certified Architect – Foundations exam, Domain 3, Task Statement 3.4: Plan Mode vs Direct Execution. Use British English throughout.
I am building a worked comparison of the two execution modes against a real codebase: one genuinely ambiguous multi-file task taken through plan mode, one well-understood single-file bug taken straight through direct execution, a library migration run as plan-then-execute, a verbose discovery task delegated to the Explore subagent, and a written decision framework distilling the criteria I actually used.
It has to satisfy all of the following:
- The plan-mode run covers a task with real ambiguity, maps the dependencies between modules, sets out more than one approach with its trade-offs, and leaves every file unmodified.
- The direct-execution run takes a bug with a clear stack trace, applies the fix immediately, stays confined to one function or file, and is visibly quicker than the planned task.
- The migration runs in two phases: the strategy fixed first with no edits, then applied file by file so the same pattern lands in every file.
- The discovery task is delegated so that only a summary reaches the main conversation, while the listings, dependency graphs and excerpts stay out of it.
- The framework names at least four criteria for plan mode and three for direct execution, each with a concrete example, and states outright that ambiguity rather than difficulty decides.
How to review.
- Ask me to paste the decision framework, the prompts I used at each phase, and what came back. If I have not pasted them, ask for that and nothing else. Do not write the framework for me, do not offer a reference version, and do not fill in a step I have skipped.
- Work through the criteria above in order. For each one, quote the line of my framework or my transcript that satisfies it, or say plainly that nothing does.
- Then hunt for the failure modes below. Each is a real workflow failure, not a style preference.
- Rank everything you find: (1) the comparison does not actually demonstrate what it claims, (2) would lose marks on the exam, (3) style. Give me the first item under (1) and then stop — wait for my fix before giving me the next one.
- If my work satisfies everything, do not congratulate me. Change the requirements — the migration now turns out to need a different pattern in one package than in the other four, discovered halfway through the execute phase — and make me say what happens to the plan.
- If I ask you to just write it for me, refuse once and give me the smallest nudge that would unblock me instead.
Failure modes to probe
- A run described as plan mode that modified files, which means the mode was never actually in force and the comparison proves nothing.
- A plan-mode task chosen with one obvious approach, so the exercise measures overhead rather than judgement.
- The migration executed before the pattern was fixed, so the first files and the last files end up treated differently.
- Explore asked to do work it cannot do — it is read-only and denied Write and Edit — or its full output pasted back into the main conversation, which throws away the isolation that was the point.
- A framework that sorts tasks by how hard they are rather than how ambiguous they are, which will pick the wrong mode on exactly the items the exam uses.
Start by asking me for my decision framework and the transcripts from each phase.