Choose plan mode or direct execution
Decide whether a change in Claude Code needs plan mode, direct execution, the Explore subagent or a plan followed by direct implementation, and defend that choice against the alternative.
Scenario
Scenario: Code Generation with Claude Code. You lead the backend of a logistics platform, and your team uses Claude Code for most changes.
Three tickets sit on your board this morning:
- change the date column of the order CSV export to ISO 8601, in one function with one test file
- move the platform from one shared database to one schema per customer
- find out why some invoices count a discount twice; nobody knows whether the bug is in pricing, the cart or the invoice renderer
Claude can start editing straight away, or it can first explore and propose a plan that you approve. Decide for each ticket before you read on.
Explanation
What decided each ticket was not its size in lines but how much is unknown before the first edit.
| Use direct execution when | Use plan mode when |
|---|---|
| The scope is clear and small (a typo, a log line, one validation check) | The change spans many files or a large migration |
| You know where the change goes | You are unfamiliar with the code or unsure where the cause is |
| There is one obvious way to do it | There are several valid approaches, with different infrastructure or architecture |
The docs give a quick test: if you could describe the diff in one sentence, skip the plan. Plan mode is useful, but it adds overhead.
How plan mode works. Press Shift+Tab until the status bar shows plan mode, prefix one prompt with /plan, or start with claude --permission-mode plan. Claude reads files, runs commands to explore and writes a plan, but doesn't edit your source. You can edit the plan with Ctrl+G, keep planning, or approve it.
Plan, then execute. Approving the plan switches the session to an editing mode, and Claude implements what you agreed. This is the usual shape of a big change: plan mode for the investigation and the decision, direct execution for the work. Planning first prevents the costly case of discovering a wrong approach after many files have changed.
The Explore subagent. Exploration reads many files, and everything it reads fills the main conversation's context. Claude Code's built-in Explore subagent is a read-only agent for file discovery and code search. It works in its own context window and returns a summary, so the main conversation keeps room for the decisions that follow. Ask for it with a prompt such as "use subagents to investigate how we read the tenant ID". Two details matter:
- Explore starts without your CLAUDE.md files, so name any convention it should look for in the request.
- It is one-shot: Claude can't resume it later, so ask for everything the next phase needs in its summary.