Part 5 · Reasoning & Planning

Harness Engineering · ~7 min

Plan Mode & Plan-First

Fixing a plan costs minutes. Fixing an implementation costs context, tokens, and git reverts. A read-only phase makes the agent prove it understands before it can change a thing.

Why this, for you: Lesson 5 put a permission boundary around what an agent may touch. Plan Mode turns that same lever forward: deny all writes during exploration, so a wrong approach surfaces in a reviewable plan instead of a broken 500-line diff. It's the cheapest place in the loop to catch a misunderstanding.

Plan Mode is a permission mode that blocks every file write and state-changing command. The agent can read, search, and analyze — but cannot modify. That forces a clean split between understanding and implementation, catching wrong approaches before they produce wrong code.

1 Why a read-only phase pays

Fixing a plan costs minutes; fixing a bad implementation costs context, tokens, and git reverts. Plan Mode makes the agent's understanding visible — if it targets the wrong files, misreads the architecture, or picks an approach that conflicts with existing patterns, you see it in the plan, not in the diff.

The mechanism is just a constraint: read-only forces the agent to ask questions and propose steps rather than execute them. You review, correct, and approve — then switch to implementation. It's a permission boundary (Lesson 5) repurposed as a thinking discipline.

2 The four-phase loop

Tool-specific Plan Mode and the tool-agnostic plan-first loop are the same shape:

PhaseWhat happensMode
ExploreAgent reads the codebase, maps relevant files and dependenciesPlan (read-only)
PlanAgent proposes step-by-step approach; you review and edit itPlan (read-only)
ImplementAgent executes against the approved planNormal
VerifyRun tests, review the diff, check for regressions

OpenAI's Sora Android team hit this directly: implementation-first prompts produced code that was functional but architecturally inconsistent; shifting to a plan-first loop gave them confidence in the direction before implementation began — like a design document giving a tech lead confidence in a project. Before approving a plan, check it identified the right files, matches existing patterns, has no scope creep, and accounts for tests.

# the plan-first opening move — understand before touching Read the auth module and summarize how session management works. Do NOT make any changes yet. # surfaces wrong assumptions while they're still cheap to fix # then: correct → co-write plan → approve → implement → diff vs plan

3 When to plan, when to skip

Plan Mode is investment; it pays off unevenly.

Use it for multi-file changes with cross-file dependencies, unfamiliar codebases where wrong assumptions are likely, tasks with several valid approaches you want to choose between, and refactors that need explicit scope boundaries. Skip it for single-file well-defined changes ("add a null check to line 42"), tasks where the path is obvious from context, and quick fixes where planning overhead exceeds the cost of a bad attempt.

The anti-pattern: "just implement it"

Telling an agent to skip planning on a multi-file feature yields code that compiles but misses architectural intent — it picks the first viable approach, which may conflict with existing patterns, miss shared utilities, or duplicate code. The rework exceeds what a 30-second plan review would have cost. The flip side is real too: forcing a plan onto a one-line change is pure overhead. Match the ceremony to the stakes.

↪ Your win: understand before you write

Retrieval practice — recall, don't peek

Question 1Plan Mode works by restricting the agent to…

Question 2The core economic argument for planning first is that…

Question 3The best opening move of a plan-first loop is to…

Question 4Plan Mode is best skipped for…

Question 5 · spaced recall from Lesson 09In the commands/agents split, the workflow steps belong in the…

Ask me anything. Want a plan-review checklist tailored to your codebase, or to see how Plan Mode sits between Lesson 5's permissions and the reasoning lever coming next? Next in Part 5: Reasoning Budget — spending the most compute exactly where ambiguity is highest.
✎ Feedback