Plan Mode vs Direct Execution

Estimated time: 20 minutes

Plan mode forces the agent to research and propose before executing. Direct execution lets Claude make the change immediately. Choosing the right one matters — using plan mode for trivial work wastes turns; using direct execution for complex work produces broken changes.

When to Use Plan Mode

  • Large-scale architectural changes (monolith to microservices, framework migration)
  • Multiple valid implementation approaches where the choice has long-term consequences
  • Multi-file modifications (10+ files) where the order of changes affects correctness
  • Library migrations where breaking changes need to be assessed
  • Anything where rollback is expensive

When to Use Direct Execution

  • Single-file bug fix with a clear stack trace pointing at the line
  • Adding a single validation check
  • Well-understood, clearly scoped changes
  • Simple refactors with no architectural impact
  • Tweaks to documentation or comments

The Explore Subagent

The Explore subagent is a tool for plan mode (or any context where you want to research without polluting the main session). It runs in a forked context, performs verbose discovery (reading files, running searches, exploring code), and returns a summary to the main session. The forked work doesn't show up in the main context window — only the summary does.

This matters for context management. A deep exploration of a 200-file codebase produces hundreds of tool calls. If those happened in the main session, the context window would fill up with intermediate results before the actual work began. Explore subagents prevent that.

Don't Use Plan Mode for Trivial Work

If the user says "rename this variable", plan mode is overkill. The agent will spend turns researching, proposing, getting approval — when a direct edit takes one turn. Plan mode shines when complexity is real, not when complexity is performed.

Recognize Stated vs Emergent Complexity

If the user says "break this monolith into microservices across dozens of files", the complexity is stated — they've told you it's complex. Plan mode is the right answer.

If the user says "fix this bug" and you start to suspect the fix touches more than the obvious file, the complexity is emergent — discovered as you investigate. The right move is to switch from direct execution to plan mode mid-task, or to use the Explore subagent to scope the actual work before committing to an approach.

The Plan File

In plan mode, Claude writes a plan file with: context (why the change), recommended approach, files to modify, verification steps. The user reviews and approves before any code changes happen. The plan file is the single source of truth for what's about to happen.

Skills to Develop

  1. Recognize stated complexity (user describes a complex task) and use plan mode.
  2. Use Explore subagents to scope work without polluting the main context.
  3. Don't escalate trivial work to plan mode.
  4. Switch from direct execution to plan mode if emergent complexity becomes apparent mid-task.
Exam tip (Q5): A monolith-to-microservices migration across dozens of files is stated complexity — use plan mode. The complexity is in the requirements, not something that might emerge later.