Persistent objectives that turn uncertain multi-step work into a verified continuation loop.
A Goal keeps the target visible across turns: what should be true, how success will be checked, and which constraints must stay intact.
The user defines the outcome. Codex follows evidence inside that scope, then completes, pauses, clears, or stops at a blocker or budget limit.
Prompt: ask → work → result → wait
Goal: work → check → continue or complete

The objective persists until the evidence says complete or blocked.
Tests, benchmarks, logs, artifacts, or source material become the audit surface.
Correctness, APIs, files, tools, and budget remain explicit.
What should be true when the work is finished.
The test, benchmark, report, artifact, or command output that proves it.
What must not regress while Codex works.
Allowed files, tools, data, repositories, and resources.
How Codex chooses the next best action after each attempt.
When to stop and report attempted paths, evidence, blocker, and needed input.
npm install -g @openai/codex@latest
/goal Reduce p95 latency below 120 ms…
Codex inspects code, runs commands, and changes the smallest useful thing.
Benchmarks and tests decide whether the target is met.
If the evidence is not enough, Codex chooses the next action.
/goal pause · resume · clear
The objective belongs to the thread where files, logs, diffs, and reasoning already live.

Codex continues only when the thread is idle, active, within budget, and no user input is queued.

Completion requires concrete files, tests, logs, benchmarks, artifacts, or research evidence.
Budget limits and lifecycle controls prevent infinite loops and preserve user authority.
Read it once. Take a photo. This example came directly from friends at OpenAI.
/goal <end state> verified by <evidence> while preserving <constraints>.
Use <scope>. Between tries, <decision rule>.
If blocked, <report why>.
No finish line. No verification surface. No constraint. Codex cannot know whether to stop, continue, or report uncertainty.
Verified by the checkout benchmark, while keeping the correctness suite green. If blocked, report attempted paths, evidence, blocker, and next input needed.
Debugging, optimization, migrations, flaky tests, benchmarks, and research audits.
Name the outcome, audit surface, constraints, boundaries, iteration policy, and blocked stop.
If proof is partial, call it partial. If blocked, say what would unlock progress.