Codex Goal Mode
Use this skill to turn a rough /goal request into a durable completion contract. Improve the
goal's clarity, evidence, scope, and stop conditions. Do not change the user's intent.
Prime Directive
Refine the goal, not the mission.
- Preserve the user's requested outcome and domain.
- Add verifiable completion criteria, constraints, and evidence requirements.
- Do not expand scope, add unrelated backlog, or turn a narrow fix into a broad audit.
- If a stronger goal would materially change the user's intent, ask before changing it.
- If the user is only asking how goal mode works, answer normally and do not create a goal.
Preflight
Run this before calling create_goal, updating an active goal, or treating a /goal message as
the working objective.
- Classify intent: explanation only, normal one-turn task, or durable goal.
- Capture the draft in one sentence using the user's language.
- Inspect context before asking when it is safely available:
- local instructions such as
AGENTS.md, README, package scripts, docs, and nearby patterns
- repo, branch, status, failing command, route, host, database, logs, issue, PR, browser surface,
or source files the user pointed at
- memory only as routing context, never as proof for drift-prone state
- Run the ambiguity gate. Infer safe defaults when the cost of being wrong is low.
- Ask only questions that change the contract. Prefer one high-leverage question; ask up to three
concise independent questions when needed.
- Synthesize a compact objective with explicit evidence, scope, constraints, anti-cheat criteria,
and final verification.
- Start execution with
create_goal when available and the contract is ready.
Do not ask "should I proceed" after the contract is clear unless the next step is destructive,
externally side-effectful, paid, credential-sensitive, or materially ambiguous.
Ambiguity Gate
A goal is ready only when these fields are known or safely inferred:
| Field |
Must answer |
| Outcome |
What concrete artifact, behavior, metric, report, or state must exist? |
| Evidence |
What command, screenshot, row, log, benchmark, deploy, file, or manual check proves it? |
| Scope |
What is included, and what is explicitly excluded? |
| Starting point |
Which repo, branch, files, URL, issue, PR, logs, failing check, or dataset should be inspected first? |
| Constraints |
What dependencies, network calls, commits, PRs, migrations, deploys, paid services, auth, or data writes are allowed? |
| Anti-cheat |
What would be a fake win, such as deleting tests, weakening requirements, hiding failures, changing unrelated behavior, or claiming unverified live coverage? |
| Progress |
How should progress be visible: chat updates, status file, commits, PR, dashboard, artifact, or checkpoint notes? |
| Finalization |
What cleanup, review, tests, browser checks, handoff, or deployment evidence is expected before completion? |
| Orchestration |
Is the work parent-only, lightweight workers, full worker run, or visible-thread handoff; what worker/thread decision is expected? |
| Browser focus |
Does browser work need a background-safe lane, and what surface/focus/durable-state constraints apply? |
Stop interviewing as soon as the missing fields are answered or safely inferable.
Evidence Rules
Use concrete evidence as the completion authority.
- Validated locally: commands, tests, typecheck, lint, build, local browser checks, generated files.
- Verified live: authenticated browser behavior, production/staging routes, live rows, deployed logs,
external API behavior, current docs, or current third-party state.
- Pushed/deployed: exact commit, branch, PR, deploy ID, host, environment, or migration status.
- Blocked: exact missing permission, auth, env var, rate limit, failing command, unavailable tool, or
external state that prevents safe progress.
- Browser evidence: target URL/app/profile, browser surface used, passive/active/manual mode, auth/session state,
durable state touched, focus interruption status, captured evidence, and next checkpoint.
- Orchestration evidence: worker count, worker scopes, skipped-worker rationale, visible-thread decision,
parent verification, and reconsider trigger.
Never blur these states. Do not claim live, authenticated, pushed, deployed, or full E2E coverage
when only local or partial checks ran.
Goal Contract Template
Use this shape when creating the objective:
Goal: <single concrete outcome, preserving the user's intent>
Done when:
- <observable proof 1>
- <observable proof 2>
Scope:
- Include: <areas, files, routes, data, workflows>
- Exclude: <non-goals and unrelated cleanup>
Constraints:
- <allowed tools, side effects, dependencies, budget, auth limits>
Orchestration:
- Mode: <parent-only | lightweight workers | full worker run | visible-thread handoff>
- Worker/thread decision:
- Reconsider trigger:
Background browser:
- Needed: <yes | no>
- Target/surface:
- Focus and durable-state constraints:
- Required receipt:
Anti-cheat:
- <invalid shortcuts or misleading ways to claim success>
Execution notes:
- Start at <repo/branch/files/docs/tests/URLs/logs>
- Track progress via <chat updates/status file/commits/PR/artifact>
Final verification:
- Run <commands/checks/browser/manual verification>
- Report local vs live vs pushed/deployed status separately
- Clean up dead ends before marking complete
Keep the objective short enough to survive long runs, but specific enough that another agent can
decide whether it is complete from evidence.
Good Goal Patterns
Prefer measurable and auditable goals:
- "Make the checkout benchmark p95 under 120 ms while the correctness suite stays green."
- "Migrate this feature to TypeScript strict mode without explicit
any, verified by build and
focused tests."
- "Investigate the production duplicate-delivery incident read-only first, prove the root cause
from rows/logs/traces, then propose or implement the narrow fix."
- "Improve this UI against the provided reference, verified by desktop and mobile browser
screenshots, without changing unrelated flows."
Avoid goals like:
- "Fix everything."
- "Make it better."
- "Improve UX" without target workflow, evidence, or boundaries.
- "Ship it" without deploy target and verification surface.
Running The Goal
- If no active goal exists and
create_goal is available, call it with the synthesized objective.
- If a token budget was provided, pass it exactly. Do not invent one.
- If the client already created an active goal from rough text, treat this skill's synthesized
contract as the working contract unless the user explicitly wants to replace or clear the goal.
- If
create_goal is unavailable, give the exact refined /goal payload and continue only if the
user explicitly wants normal non-goal execution or the client exposes an active goal.
- After major chunks, check status when the goal tool is available and compare progress to the
evidence requirements.
- If the same failure repeats, change the approach or narrow the evidence plan. Do not spin.
- Mark complete only after final verification exists.
- Mark blocked only when the blocker is specific, repeated, and no meaningful safe alternative
remains under the contract.
Finalization
Before reporting completion:
- Remove abandoned experiments, temporary files, and unrelated edits unless they are intentionally
preserved and disclosed.
- Run focused verification. For code changes with meaningful risk, run review or a code-review pass
when available.
- State exactly what was validated locally, verified live, pushed, deployed, blocked, and what the
next action is if anything remains manual.
1---2name: goal3description: Use when the user invokes /goal, asks for Codex goal mode, or starts long-horizon autonomous work that should be refined into a concrete, verifiable goal contract before execution. Use for durable coding, debugging, research, migration, browser-testing, deployment-check, or data-review tasks where Codex should keep working until evidence proves completion or a real blocker remains.4---56# Codex Goal Mode78Use this skill to turn a rough `/goal` request into a durable completion contract. Improve the9goal's clarity, evidence, scope, and stop conditions. Do not change the user's intent.1011## Prime Directive1213Refine the goal, not the mission.1415- Preserve the user's requested outcome and domain.16- Add verifiable completion criteria, constraints, and evidence requirements.17- Do not expand scope, add unrelated backlog, or turn a narrow fix into a broad audit.18- If a stronger goal would materially change the user's intent, ask before changing it.19- If the user is only asking how goal mode works, answer normally and do not create a goal.2021## Preflight2223Run this before calling `create_goal`, updating an active goal, or treating a `/goal` message as24the working objective.25261. Classify intent: explanation only, normal one-turn task, or durable goal.272. Capture the draft in one sentence using the user's language.283. Inspect context before asking when it is safely available:29 - local instructions such as `AGENTS.md`, README, package scripts, docs, and nearby patterns30 - repo, branch, status, failing command, route, host, database, logs, issue, PR, browser surface,31 or source files the user pointed at32 - memory only as routing context, never as proof for drift-prone state334. Run the ambiguity gate. Infer safe defaults when the cost of being wrong is low.345. Ask only questions that change the contract. Prefer one high-leverage question; ask up to three35 concise independent questions when needed.366. Synthesize a compact objective with explicit evidence, scope, constraints, anti-cheat criteria,37 and final verification.387. Start execution with `create_goal` when available and the contract is ready.3940Do not ask "should I proceed" after the contract is clear unless the next step is destructive,41externally side-effectful, paid, credential-sensitive, or materially ambiguous.4243## Ambiguity Gate4445A goal is ready only when these fields are known or safely inferred:4647| Field | Must answer |48| --- | --- |49| Outcome | What concrete artifact, behavior, metric, report, or state must exist? |50| Evidence | What command, screenshot, row, log, benchmark, deploy, file, or manual check proves it? |51| Scope | What is included, and what is explicitly excluded? |52| Starting point | Which repo, branch, files, URL, issue, PR, logs, failing check, or dataset should be inspected first? |53| Constraints | What dependencies, network calls, commits, PRs, migrations, deploys, paid services, auth, or data writes are allowed? |54| Anti-cheat | What would be a fake win, such as deleting tests, weakening requirements, hiding failures, changing unrelated behavior, or claiming unverified live coverage? |55| Progress | How should progress be visible: chat updates, status file, commits, PR, dashboard, artifact, or checkpoint notes? |56| Finalization | What cleanup, review, tests, browser checks, handoff, or deployment evidence is expected before completion? |57| Orchestration | Is the work parent-only, lightweight workers, full worker run, or visible-thread handoff; what worker/thread decision is expected? |58| Browser focus | Does browser work need a background-safe lane, and what surface/focus/durable-state constraints apply? |5960Stop interviewing as soon as the missing fields are answered or safely inferable.6162## Evidence Rules6364Use concrete evidence as the completion authority.6566- Validated locally: commands, tests, typecheck, lint, build, local browser checks, generated files.67- Verified live: authenticated browser behavior, production/staging routes, live rows, deployed logs,68 external API behavior, current docs, or current third-party state.69- Pushed/deployed: exact commit, branch, PR, deploy ID, host, environment, or migration status.70- Blocked: exact missing permission, auth, env var, rate limit, failing command, unavailable tool, or71 external state that prevents safe progress.72- Browser evidence: target URL/app/profile, browser surface used, passive/active/manual mode, auth/session state,73 durable state touched, focus interruption status, captured evidence, and next checkpoint.74- Orchestration evidence: worker count, worker scopes, skipped-worker rationale, visible-thread decision,75 parent verification, and reconsider trigger.7677Never blur these states. Do not claim live, authenticated, pushed, deployed, or full E2E coverage78when only local or partial checks ran.7980## Goal Contract Template8182Use this shape when creating the objective:8384```text85Goal: <single concrete outcome, preserving the user's intent>8687Done when:88- <observable proof 1>89- <observable proof 2>9091Scope:92- Include: <areas, files, routes, data, workflows>93- Exclude: <non-goals and unrelated cleanup>9495Constraints:96- <allowed tools, side effects, dependencies, budget, auth limits>9798Orchestration:99- Mode: <parent-only | lightweight workers | full worker run | visible-thread handoff>100- Worker/thread decision:101- Reconsider trigger:102103Background browser:104- Needed: <yes | no>105- Target/surface:106- Focus and durable-state constraints:107- Required receipt:108109Anti-cheat:110- <invalid shortcuts or misleading ways to claim success>111112Execution notes:113- Start at <repo/branch/files/docs/tests/URLs/logs>114- Track progress via <chat updates/status file/commits/PR/artifact>115116Final verification:117- Run <commands/checks/browser/manual verification>118- Report local vs live vs pushed/deployed status separately119- Clean up dead ends before marking complete120```121122Keep the objective short enough to survive long runs, but specific enough that another agent can123decide whether it is complete from evidence.124125## Good Goal Patterns126127Prefer measurable and auditable goals:128129- "Make the checkout benchmark p95 under 120 ms while the correctness suite stays green."130- "Migrate this feature to TypeScript strict mode without explicit `any`, verified by build and131 focused tests."132- "Investigate the production duplicate-delivery incident read-only first, prove the root cause133 from rows/logs/traces, then propose or implement the narrow fix."134- "Improve this UI against the provided reference, verified by desktop and mobile browser135 screenshots, without changing unrelated flows."136137Avoid goals like:138139- "Fix everything."140- "Make it better."141- "Improve UX" without target workflow, evidence, or boundaries.142- "Ship it" without deploy target and verification surface.143144## Running The Goal145146- If no active goal exists and `create_goal` is available, call it with the synthesized objective.147- If a token budget was provided, pass it exactly. Do not invent one.148- If the client already created an active goal from rough text, treat this skill's synthesized149 contract as the working contract unless the user explicitly wants to replace or clear the goal.150- If `create_goal` is unavailable, give the exact refined `/goal` payload and continue only if the151 user explicitly wants normal non-goal execution or the client exposes an active goal.152- After major chunks, check status when the goal tool is available and compare progress to the153 evidence requirements.154- If the same failure repeats, change the approach or narrow the evidence plan. Do not spin.155- Mark complete only after final verification exists.156- Mark blocked only when the blocker is specific, repeated, and no meaningful safe alternative157 remains under the contract.158159## Finalization160161Before reporting completion:162163- Remove abandoned experiments, temporary files, and unrelated edits unless they are intentionally164 preserved and disclosed.165- Run focused verification. For code changes with meaningful risk, run review or a code-review pass166 when available.167- State exactly what was validated locally, verified live, pushed, deployed, blocked, and what the168 next action is if anything remains manual.