Plan, Steer, and Finish

Lesson 5 · Execution control · ~10 minutes

Codex gives you two useful controls for difficult work: Plan mode shapes an ambiguous task before edits; Goal mode keeps a measurable objective active across a long execution.

Unclear problem or tradeoffs? → /plan
Clear multi-step objective?   → /goal
Small bounded change?         → direct prompt
Need explanation mid-task?    → side chat

Write a Verifiable Goal

A goal is both the starting instruction and the completion test. Replace “improve performance” with an observable condition.

Reduce the dashboard's p95 load time below 800 ms.
Preserve current behavior, add a regression benchmark,
and report the before/after measurement.
Do not confuse persistence with scope

A long-running goal still needs explicit constraints. “Do not change the API” remains relevant at every step.

Use Checkpoints, Not Constant Steering

Interrupting every small decision prevents Codex from completing a coherent loop. Instead, establish checkpoints where new evidence should change the plan:

  1. After reproducing the baseline problem
  2. After choosing between materially different approaches
  3. After the first complete implementation
  4. After verification and before cleanup

At a checkpoint, ask for the evidence gathered, assumptions invalidated, remaining risks, and the next bounded step.

Manage Thread Context Deliberately

SituationResponse
Same task, new constraintContinue the thread and state the constraint explicitly
Need explanation without redirecting workUse a side chat when available
Unrelated objectiveStart a new thread
Long task after compactionRestate critical constraints and completion tests
Status prompt

Ask: “Report completed evidence, unresolved decisions, changed files, verification run, and the next action.” This exposes drift without restarting the task.

Check Your Understanding

The outcome is valuable but the requirements remain ambiguous. What should you use first?
Correct. Resolve ambiguity before turning the result into a persistent goal.
Use Plan mode to clarify the task and completion criteria first.

Do This Now

Take one fuzzy backlog item. Ask Codex in Plan mode to interview you, expose assumptions, and produce a goal with one measurable completion condition. Add two checkpoints and state what evidence must be available at each one.

Primary Source

Prompting Codex documents threads, context, Plan mode guidance, and Goal mode.

Questions? Show me a draft goal and I will challenge whether Codex can objectively determine completion.
← PreviousNext →