Claude Code Plan Mode vs Direct Execution and Iterative Refinement

Choosing the right working mode saves hours of rework. The exam tests when to plan first, when to just make the change, and how to steer Claude when its output isn’t what you meant (Task Statements 3.4 and 3.5).

Advertisement
📖 What You’ll Learn: You will be able to choose plan mode or direct execution for a task and steer Claude with examples, tests and questions.

🗺️ Plan mode or direct execution?

Plan modeDirect execution
Large-scale or multi-file changes (e.g. a library migration touching 45+ files)Clear, well-scoped changes
Architectural decisions (monolith → microservices)Single-file bug fix with a stack trace
Several valid approaches to compareAdding one validation check

Combine them: plan the migration, agree the approach, then execute the plan directly.

⚠️ Watch out: “Start in direct execution and switch to plan mode if it gets complex” is wrong when the scenario already tells you the task is complex.

🤖 The Explore subagent

Explore isolates verbose discovery (file listings, grep output) and returns a summary, preserving the main conversation’s context during multi-phase tasks.

🔄 Iterative refinement techniques

  • Concrete input/output examples — when prose descriptions are interpreted inconsistently, give 2–3 examples of input and expected output.
  • Test-driven iteration — write tests first (including edge cases and performance), then iterate by sharing failures.
  • The interview pattern — ask Claude to question you first in unfamiliar domains, surfacing issues like cache invalidation and failure modes.
  • Interacting vs independent issues — put interacting problems in one detailed message; fix independent ones one at a time.
Advertisement

🧪 Exam-Style Practice Questions

Try these before opening the answers. They use the same scenario style as the real exam.

Question 1. Which tasks suit **plan mode**? *(Choose two)*

  • A. Restructuring a monolith into services
  • B. Renaming a local variable
  • C. Choosing between two message-queue integrations with different infrastructure needs
  • D. Adding a single `if` validation
  • E. Fixing a typo in a log message
Show answer

Answer: A, C. Architectural, multi-approach work. E, D and B are clear, scoped changes suited to direct execution.

Question 2. You're building a caching layer in a domain you don't know well. Which technique surfaces the considerations you haven't thought of?

  • A. The interview pattern: have Claude ask you questions before implementing
  • B. Direct execution
  • C. Few-shot examples
  • D. `/compact`
Show answer

Answer: A. Claude's questions surface invalidation, consistency and failure modes. B jumps straight to code. C needs known examples. D is irrelevant.

Question 3. Three bugs interact: fixing the parser changes the validator's input, which changes the formatter. How should you raise them?

  • A. One at a time, in separate messages
  • B. Only the first; the rest will resolve themselves
  • C. Through three parallel sessions
  • D. All in one detailed message, explaining the interactions
Show answer

Answer: D. Interacting issues need a joint fix. A and C suit independent issues. B is wishful thinking.

Advertisement

📝 Assignment

Do these tasks in order. Each one has a Done when check, so you know when it is complete. The stretch task is optional but close to what the exam expects from an architect. Keep your answers in one notes file or Git repository, and revisit them in your final week of revision together with the cheat sheet in the last lesson of this course.

  1. Task 1: Do a one-line fix in direct execution and a ten-file rename in plan mode, and compare the experience.
    ✅ Done when: You wrote two sentences comparing time spent and rework for the two modes.
  2. Task 2: Give Claude two input and output examples for a data transformation and compare the result with a prose-only request.
    ✅ Done when: The example-driven request gives the expected output on the first or second try, and you noted how many tries prose needed.
  3. Stretch: start an unfamiliar feature with the interview pattern and list the questions Claude asked you.
    ✅ Done when: You listed at least three questions Claude asked and one design change they led to.
Advertisement

❓ Frequently Asked Questions

🤔 When should I use plan mode in Claude Code?

For large, multi-file or architectural changes and when there are several valid approaches to compare.

🤔 When is direct execution better?

For clear, scoped changes such as a single-file bug fix with a stack trace.

🤔 What is the Explore subagent for?

It runs noisy discovery in isolation and returns a summary, keeping the main context clean.

🤔 What is the interview pattern?

Asking Claude to question you before building, so it surfaces design issues you had not considered.

🏁 Summary

  • Plan for architecture and multi-file work; act directly on clear, scoped fixes.
  • Explore keeps discovery noise out of the main context.
  • Examples and tests beat longer prose instructions.
📝 Test yourself: Mock Test 1 · Mock Test 4 (30 scenario-based questions in 60 minutes, with explanations).

Next, continue with Claude Code in CI/CD: -p Flag, JSON Output and Automated PR Review.

🎬 Prefer video? Watch QA, automation and AI testing tutorials on the SQA Tools YouTube channel.

Independent study material by SQA Tools. Not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic. Mock questions are original practice items, not real exam content. Exam facts checked against Anthropic's official exam guides and certification FAQ on 11 November 2026.