CertSafari
    Anthropic Claude Certified Architect – Foundations (CCAR-F)· Lessons

    Domain 3 · Lesson 16/30

    Plan mode vs direct execution in Claude Code

    Determine when to use plan mode vs direct execution

    15 min read
    3.33% of exam
    9 sources
    Published 20 Oct 2026
    Docs as of 14 Oct 2026

    What you will be able to do

    • Explain what plan mode allows and blocks, and how it differs from the other permission modes
    • Decide whether a task needs plan mode or direct execution, based on its scope, its architectural reach and how many valid approaches it has
    • Explain why exploring and designing in plan mode, before any edit, prevents expensive rework
    • Use the Explore subagent to keep verbose discovery output out of the main conversation during a multi-phase task
    • Sequence a large change as a planned investigation followed by direct implementation

    Key concept

    Plan mode — Plan mode is a permission mode in which Claude can read and investigate the codebase freely and propose a plan, but cannot edit files until you approve that plan. It separates deciding how to make a change from making it.

    1.What plan mode allows and what it holds back

    Every Claude Code session runs in a permission mode, and plan mode is one of them. The mode decides which actions run without asking you. In plan mode, Claude reads files, searches and traces code paths, then writes up a proposed plan. It does not touch your source files. You can start a session in this mode with claude --permission-mode plan, or move into it partway through with Shift+Tab in the CLI. VS Code and Desktop each have a mode selector that does the same job.

    Starting a session in plan mode from the command linebash
    claude --permission-mode plan

    Plan mode feels smooth for that reason. Claude can open dozens of files and run read-only searches with no prompt for each one, because none of that changes anything. When auto mode is available, plan mode also lets through commands that the classifier has approved. Edits are the line it holds: nothing gets written until you approve the plan. When you approve it, you decide how implementation runs, so the session moves to an editing mode only because you switched it. It never changes mode on its own partway through.

    Permission modes, compared by what runs without asking and what each is for
    ModeWhat runs without askingBest for
    defaultReads onlyReviewing every action yourself, sensitive work
    acceptEditsReads, file edits, and common filesystem commands (mkdir, touch, mv, cp, etc.)Iterating on code you’re reviewing
    planReads, plus classifier-approved commands when auto mode is availableExploring a codebase before changing it
    autoEverything, with background safety checksLong tasks, reducing prompt fatigue
    bypassPermissionsEverythingIsolated containers and VMs only

    Reads are not exempt from every check. They pass in plan mode because the mode allows them, not because a global exemption exists. Some prompts survive in every mode. Suppose the permissions.blockReadsOutsideWorkingDirectories setting is on: a recognised file-reading Bash command that targets a path outside the working directories still prompts, even in auto and bypassPermissions. Explicit ask rules prompt in every mode too.

    Checkpoint 1 of 7· Fill the gap

    A library migration will touch about 45 files, and there are several valid ways to do it. You want Claude to explore the codebase and propose a design, with no source file edited until you approve that design. Which value completes the command?

    claude --permission-mode  ? 

    Checkpoint 2 of 7· Exam question

    A team lead has two tasks for Claude Code this week: migrating a payments library across 45 files to a new integration approach with several valid designs, and adding a null check to one function where a stack trace pinpoints the bug. Which mode choice best fits these tasks?

    Sources12

    2.Choosing between plan mode and direct execution

    Choose plan mode when the task needs a decision before it needs edits. Look for four signs. The change is large-scale. More than one approach could work. The change has architectural consequences. Or it spans many files that must end up consistent with each other. Restructuring a monolith into microservices shows all four: shared data models, service boundaries and deployment topology all move, and there are several reasonable ways to split the code. A library migration that touches 45 or more files does too. So does choosing between two integration approaches with different infrastructure requirements, even if the code that follows the choice is small.

    Choose direct execution when the scope is already known. Typical cases are a single-file bug fix with a clear stack trace, or adding one date-validation conditional to one function. Planning would only repeat what the prompt already says. The work here goes into the prompt: name the file, the scenario and the expected result. For bugs, give Claude the command that reproduces the issue and produces the stack trace. A session in default or acceptEdits mode then makes the change, and you review it.

    Matching tasks to an approach
    TaskApproachDeciding factor
    Split a monolith into three servicesplanSeveral valid splits; boundaries and data models are architectural
    Migrate a library used across 45+ filesplanOne conversion pattern must be settled before any file changes
    Pick between two integration approaches with different infrastructureplanThe choice itself is the hard part
    Fix a bug in one file with a clear stack tracedirectLocation and cause are already known
    Add a date validation check to one functiondirectSingle, well-scoped change

    Getting this wrong usually costs you a second pass. Suppose a migration runs directly from the first file. Nothing settles the conversion pattern in advance, so it gets decided file by file. The early files come out one way. After Claude has seen more of the codebase, the later files come out another way, and someone has to reconcile them. Plan mode prevents this. The whole codebase is explored and one pattern is agreed while edits are still blocked, so every file is converted the same way.

    Plan mode makes exploration safe, because investigation and design both happen while edits are blocked. Claude can read the affected modules, trace call paths and weigh alternatives, and the only output is a proposal. A wrong direction then costs a correction to the plan instead of a revert of a diff. That is the rework plan mode exists to prevent: a flawed approach caught in the plan takes one message to fix, while the same flaw found after a dozen files have changed means rewinding and redoing them. The exploration is also what makes the plan trustworthy, since the approach is proposed from what Claude actually found in the code rather than from assumptions about it.

    Other modes cannot stand in for the design step. acceptEdits removes prompts for edits, so Claude starts changing code before any boundaries are agreed. Writing the intended layout into CLAUDE.md and approving edits one by one in default mode still makes you judge a large redesign one piece at a time. Running headless in CI with bypassPermissions is worse still: that mode is meant for isolated containers and VMs, and the design only gets reviewed after the code already exists.

    Checkpoint 3 of 7· Check yourself

    Your team must decide whether a new payments integration should use a webhook receiver or a polling worker. The two need different infrastructure, but either way the code change will be fewer than 30 lines. How should you run this task in Claude Code?

    Checkpoint 4 of 7· Exam question

    A team lead reviewing a completed library migration finds that early file conversions used one pattern, while later files in the same migration used a different, incompatible pattern, forcing a second pass to reconcile them. Which earlier decision most likely caused this outcome?

    Checkpoint 5 of 7· Exam question

    A platform team is restructuring a monolith into three microservices, touching shared data models, service boundaries, and deployment topology, with several viable ways to split the code. Before any files are changed, which approach should the architect direct Claude Code to take?

    Sources13452

    3.Keeping discovery out of the main context with the Explore subagent

    The planning phase of a big task is where context fills up fastest. Cataloguing every call site of a library across a large codebase means reading a great many files, and each read adds to the conversation. Recall also gets worse as the context grows, so a session that has filled its window with search output does worse when it reaches implementation. In general terms, verbose research belongs in a separate context; see Delegating verbose exploration to protect main context. What follows is how that works during plan-mode discovery.

    Claude Code has a built-in Explore subagent for this kind of work. Its job is file discovery, code search and codebase exploration. It has read-only tools, with Write and Edit denied, so it cannot change anything while it looks. It runs in its own context window. The large file reads stay there, and only a summary returns to the main conversation. When a plan-mode investigation needs a wide sweep, such as finding every usage pattern before choosing a migration approach, Claude can send that sweep to Explore and plan from the summary. Claude Code also has a built-in Plan subagent, which is read-only as well and whose purpose is codebase research for planning.

    Checkpoint 6 of 7· Check yourself

    Midway through planning a multi-phase migration, Claude has to find every usage pattern of the old library across hundreds of files before it can propose an approach. You want the main session to keep enough context for the plan and the implementation that follows. What should happen to this discovery sweep?

    Sources6789

    4.Plan the investigation, then implement directly

    Most large tasks use both approaches, one after the other. The investigation runs in plan mode: which files need to change, what the flow looks like, which approach to take. Once you approve the plan, implementation runs as direct execution against it. Take adding Google OAuth. The first prompt asks "I want to add Google OAuth. What files need to change?" and asks for a plan. After approval, the next prompt says "implement the OAuth flow from your plan", followed by writing tests, running the suite and committing.

    There are good reasons to switch modes at the boundary. Plan mode is for reviewing changes before they reach disk, and once the plan is approved that review has happened. Staying in plan mode would block the edits the plan calls for. Switching to an editing mode lets the work go ahead without asking again about decisions already made. A long migration can also outlast the context window. When the session compacts, the plan written in plan mode is re-injected from disk, so the agreed pattern is still there for the later files.

    Some tasks need no plan phase at all. A pre-approved fix in a CI pipeline, such as changing one timeout value to a value already specified, has no approach left to choose. It runs non-interactively with a tight allowlist, in the mode meant for locked-down CI and scripts.

    Checkpoint 7 of 7· Put it in order

    Put these steps for adding Google OAuth to an existing app in the order the plan-then-execute workflow runs them.

    1. 1.In plan mode, ask Claude which files need to change and what the session flow is, and have it create a plan
    2. 2.Commit with a descriptive message and open a PR
    3. 3.Switch to an editing mode and ask Claude to implement the OAuth flow from its plan
    4. 4.Have Claude write tests for the callback handler, run the test suite and fix any failures
    5. 5.Review and approve the plan while edits are still blocked

    Sources5471

    Sources

    (9)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Switch permission modes with Shift+Tab in the CLI, the mode indicator in VS Code, or the mode selector in Desktop.”
      ↩︎ What plan mode allows and what it holds back
      “Claude Code blocks edits until you approve a plan”
      ↩︎ What plan mode allows and what it holds back
      “recognized file-reading Bash commands prompt even in auto mode and bypassPermissions mode”
      ↩︎ What plan mode allows and what it holds back
      “Exploring a codebase before changing it”
      ↩︎ Choosing between plan mode and direct execution
      “Isolated containers and VMs only”
      ↩︎ Choosing between plan mode and direct execution
      “Claude Code blocks edits until you approve a plan”
      ↩︎ Key concept
      “recognized file-reading Bash commands prompt even in auto mode and bypassPermissions mode”
      ↩︎ Exam trap 1
      “Exploring a codebase before changing it”
      ↩︎ Exam trap 2
      “Isolated containers and VMs only”
      ↩︎ Exam trap 3
      “Reads only”
      ↩︎ Prediction
      “Explore before changing anything | claude --permission-mode plan | None | Claude Code blocks edits until you approve a plan”
      ↩︎ Checkpoint
      “Exploring a codebase before changing it”
      ↩︎ Prediction
    2. 2.
      “Plan: Claude explores and proposes a plan without editing your source files”
      ↩︎ What plan mode allows and what it holds back
      “Accept edits: Claude edits files and runs common filesystem commands like mkdir and mv without asking, still asks for other commands”
      ↩︎ Choosing between plan mode and direct execution
    3. 3.
      “Claude explores the codebase and proposes an approach for your approval, preventing expensive re-work when the initial direction is wrong.”
      ↩︎ Choosing between plan mode and direct execution
      “Claude explores the codebase and proposes an approach for your approval, preventing expensive re-work when the initial direction is wrong.”
      ↩︎ Exam trap 4
    4. 4.
      “Tell Claude the command to reproduce the issue and get a stack trace”
      ↩︎ Choosing between plan mode and direct execution
      “Plan before editing to review changes before they touch disk”
      ↩︎ Plan the investigation, then implement directly
    5. 5.
      “Scope the task. Specify which file, what scenario, and testing preferences.”
      ↩︎ Choosing between plan mode and direct execution
      “I want to add Google OAuth. What files need to change?”
      ↩︎ Plan the investigation, then implement directly
      “implement the OAuth flow from your plan.”
      ↩︎ Plan the investigation, then implement directly
      “implement the OAuth flow from your plan.”
      ↩︎ Exam trap 5
      “implement the OAuth flow from your plan. write tests for the callback handler, run the test suite and fix any failures.”
      ↩︎ Checkpoint
    6. 6.
      “Purpose: file discovery, code search, codebase exploration”
      ↩︎ Keeping discovery out of the main context with the Explore subagent
      “Tools: read-only tools; Write and Edit are denied”
      ↩︎ Keeping discovery out of the main context with the Explore subagent
      “To remove only the built-in Explore and Plan subagents, set CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS=1.”
      ↩︎ Keeping discovery out of the main context with the Explore subagent
    7. 7.
      “a subagent handles the research in its own separate context window, so the large file reads stay out of yours”
      ↩︎ Keeping discovery out of the main context with the Explore subagent
      “The plan Claude wrote in plan mode | Re-injected from disk”
      ↩︎ Plan the investigation, then implement directly
      “a subagent handles the research in its own separate context window, so the large file reads stay out of yours.”
      ↩︎ Checkpoint
    8. 9.
      “as the number of tokens in the context window increases, the model’s ability to accurately recall information from that context decreases.”
      ↩︎ Keeping discovery out of the main context with the Explore subagent

    Ready to test yourself?

    Practise the 16 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.