Task statement 3.4 · Claude Code configuration and workflows

Determine when to use plan mode vs direct execution

Two requests arrive the same morning: migrate packages/web from Moment.js to date-fns across 45 files, and add a missing date check to one function in packages/api. Only the migration has an approach to decide before any file changes.

Why it's tested

Two tempting shortcuts ignore what the request already says. Starting in direct execution and switching to plan mode "if it gets complicated" waits for complexity that is already stated, such as service boundaries to decide. Writing exhaustive instructions up front fixes the approach before anyone has read the code. Either way, the wrong approach is found after files have changed, which is the rework plan mode prevents.

KnowledgeWhat plan mode does

Plan mode is a permission mode in which Claude researches and proposes changes without making them. Claude reads files and runs shell commands to explore, and it hands larger research to the read-only Plan subagent, whose output stays in its own context window. Your source stays unedited until you approve the plan, so exploration and design happen before any change is committed, which prevents costly rework.

  1. Enter plan mode with Shift+Tab, a /plan prefix on one prompt, or claude --permission-mode plan.
  2. Claude explores and presents a plan.
  3. You approve it, choose "No, keep planning" and say what to change, or press Shift+Tab to leave without approving.
  4. Approving exits plan mode into an editing mode, and Claude carries out the plan by direct execution.

Interactive · triage a task

Two lanes read top to bottom. Direct execution goes from the prompt straight to edits and tests. Plan mode goes from the prompt to read-only research, then a plan you approve, then the session leaves plan mode and the same lane continues as direct execution: edits, then tests. Direct execution SCOPE CLEAR · ONE OBVIOUS APPROACH "reject a dueDate before startDate" "fix: TypeError at isOverdue (dates.ts:42)" NO PLAN, NO APPROVAL Claude adds one conditional to validateTask() Claude returns false for a null dueDate DIFF Tests run · you review the diff Plan mode, then direct execution PHASE 1 · PLAN MODE · EDITS BLOCKED "migrate packages/web from moment to date-fns" "split packages/api into billing and users" "add search: hosted API or Elasticsearch?" READ-ONLY RESEARCH Plan subagent reads the code IN ITS OWN CONTEXT WINDOW FINDINGS Plan: date adapter first, then the 45 callers Plan: the service boundary and shared tables Plan: compares the infrastructure each needs YOU APPROVE PHASE 2 · EDITS ALLOWED Claude edits the 45 files in the planned order Claude moves the modules service by service Claude builds the approach you approved DIFF Tests run · you review the diff

Choose a task to see its lane.

Direct execution · the stack trace names one function in one file, and the fix is obvious, so nothing is left to decide.

Direct execution · one validation conditional in one function is a diff you could describe in one sentence.

Plan mode, then direct execution · the service boundary is an architectural decision. Once you approve it, the moves follow the plan.

Plan mode, then direct execution · adapter or caller-by-caller is decided before any of the 45 files changes. Then the session executes the approved order.

Plan mode, then direct execution · the two approaches need different infrastructure in packages/infra, so you choose before any code exists.

Time runs down both lanes. Edits wait for approval only on the right, and below the dashed line the approved plan runs like the left lane.

KnowledgeWhich tasks need a plan

Plan mode is designed for complex tasks involving large-scale changes, multiple valid approaches, architectural decisions and multi-file modifications, because a wrong choice there shows up only after many files change. Direct execution is appropriate for simple, well-scoped changes, where you could describe the diff in one sentence, so a plan only costs tokens and time.

Plan mode

A decision remains

Microservice restructuring: where does the billing/users boundary in packages/api run?

Library migration, 45+ files: an adapter first, or edit each caller?

Two integration approaches: a hosted search API, or Elasticsearch in packages/infra? Their infrastructure requirements differ.

Direct execution

The change is understood

Single-file bug fix, clear stack trace: TypeError … null (reading 'getTime') at isOverdue (dates.ts:42). Return false for a null dueDate.

Adding a validation check to one function: validateTask() rejects a dueDate before startDate.

SkillPlan the migration, then execute it

Started directly, Claude converts 20 files to inline date-fns calls, then reaches 7 files using moment.tz time zones, and the 20 are reworked around a shared adapter. Plan mode is only needed while the approach is undecided. In plan mode Claude maps which files use the old API and proposes an order. You approve, the session leaves plan mode, and Claude edits the 45 files following that plan.

⏸ plan mode on
> plan the move of packages/web from moment to date-fns
  Plan subagent: 45 files import moment; 7 use moment.tz
  Plan: 1 add src/lib/dates.ts over date-fns and date-fns-tz
        2 switch the 45 files to it, one folder at a time
        3 remove moment; run the tests after each folder
  ❯ Yes, manually approve edits   ← leaves plan mode
Claude edits dates.ts, then the 45 files, in that order

SkillKeep discovery out of the main conversation

A multi-phase task often opens with a verbose discovery phase. Done in the main conversation, its searches and file reads fill the context window before implementation starts. The Explore subagent is read-only and built for code search. It reads in its own context window, skips CLAUDE.md and git status to stay fast, and returns only a summary, which is all the main conversation receives:

> use the Explore subagent to find every call to formatDue()
  in packages/ and summarise how each caller uses it
  Explore · 61 files read in its own context window
← 45 callers. 38 pass a Date and use the default format.
  7 pass a time-zone name, so they need the tz option.
Before the first edit, ask: Is there still a decision to make about how to do this?
Yes: boundaries, approach or scope are openPlan mode. Approve the plan, then the session executes it directly.
No: the change is understoodDirect execution, with no plan.
Takeaway
  • Complexity stated in the request calls for plan mode from the first prompt, not partway through.
  • Approval ends plan mode, and the plan then runs as direct execution.
  • Explore stops discovery output from exhausting the main context, because only its summary returns.

check yourself

0 / 3 answered

Rate limiting must be added to packages/api. One option is middleware in the API process. The other is gateway rules defined in packages/infra, which need new infrastructure. The work will touch about 20 files, and the tech lead wants the choice reviewed before any code changes.What is the most effective first step?

Select one.

Claude must audit error handling in 120 files under packages/web, then redesign the error-boundary pattern and apply it. Last time, the audit's file reads filled the main context and Claude lost the agreed naming during edits. The team wants the audit's raw output kept out of the main conversation and the design approved before edits.Which TWO changes best meet both requirements?

Select two.

A CI run fails with TypeError: Cannot read properties of undefined (reading 'email') at sendReceipt (packages/api/src/notify.ts:31). Guest orders have no user object, and the agreed fix is to skip the receipt email when user is undefined. The team is short on its token budget this sprint.Which is the most proportionate response?

Select one.

sources

  1. Claude Docs, "Choose a permission mode": plan mode reads files and runs shell commands to explore without editing source; the entry points Shift+Tab, /plan and --permission-mode plan; the approve and "No, keep planning" options; approving exits plan mode into an editing mode. Checked 2026-10-01.
  2. Claude Docs, "Best practices for Claude Code": explore, plan, implement, commit; plan mode adds overhead; "If you could describe the diff in one sentence, skip the plan". Checked 2026-10-01.
  3. Claude Docs, "Create custom subagents": the built-in read-only Explore and Plan agents, what they skip (CLAUDE.md, git status), Plan's role in plan mode, naming a subagent in a prompt, and that only a summary returns to the main conversation. Checked 2026-10-01.
  4. Task statement text; the microservice restructuring, 45+-file library migration, integration-approaches, stack-trace, validation-check and plan-then-execute examples: Claude Certified Architect — Foundations Exam Guide v1.0, Domain 3.4. The monorepo and its package names are this course's Scenario 2 details.