Quick Ref / Command

Marketing Kit

/ak:codex-goal

Guide Codex /goal work

Shapes Codex /goal work into a clear objective with feature availability, validation checkpoints, boundaries, and a verifiable stop condition.

01

Check availability

02

Apply use test

03

Reject bad fit

04

Draft objective

Rule 01

A goal needs one objective and a verifiable end state, not a wishlist.

Rule 02

Codex can continue mechanical work, but it must pause for product or architecture decisions.

Rule 03

Official /goal documentation is the source of truth; do not claim undocumented lifecycle behavior.

Execution Map

Core lanes from input to output, aligned with the command's real execution path.

01

Start

Input, scope, route

  1. 1 Check availability Confirm /goal appears in Codex slash commands; if absent, enable goals in config or with codex features enable goals.
  2. 2 Apply use test Use /goal only for longer-than-one-turn, mainly mechanical work with a testable stop condition and clear scope.
02

Work

Agent / skill execution

  1. 3 Reject bad fit Avoid exploratory work, vague improvements, production credential changes, destructive infrastructure, and unrelated backlogs.
  2. 4 Draft objective Write one objective with files to read first, fixed constraints, validation command, checkpoints, and stop condition.
03

Verify

Gate, review, validation

  1. 5 Protect tests Explicitly prohibit weakening, narrowing, skipping, or deleting tests to satisfy the goal.
  2. 6 Run with checkpoints Ask Codex to validate after each checkpoint, keep a brief progress log, and pause for ambiguity.
04

Close

Report, handoff, artifact

  1. 7 Review final diff Review the final diff before merging or accepting the autonomous run outcome.

Don't skip the required step

Each item contrasts a tempting shortcut with the required approach.

Tempting shortcut

Goal mode can just keep going until everything is better.

Do this instead

The skill requires a bounded objective and a stop condition.

Tempting shortcut

Codex can decide ambiguous product tradeoffs.

Do this instead

Pause when progress needs human product or architecture input.

Sample Prompt

Concrete invocations for each flag, subcommand, mode, or route available in the live workflow.

Draft a goal Recommended
/ak:codex-goal Complete the pricing page refactor with tests passing after each checkpoint
Use when:
Use when an autonomous Codex run needs a bounded objective and validation loop.
Expected:
A /goal contract with read-first files, constraints, validation, checkpoints, and stop condition.
Evaluate fit
/ak:codex-goal migrate these mechanical lint fixes across the repo
Use when:
Use to decide whether a proposed long-running task belongs in goal mode.
Expected:
A fit assessment against mechanical scope, operational clarity, durable checkpoints, and verifiable stop conditions.
Refine draft
/ak:codex-goal goal draft for adding missing tests to checkout flow
Use when:
Use when the user already has a rough goal but needs a safer contract.
Expected:
A tightened goal with explicit boundaries, required validation, and no test-weakening escape hatch.

Handled Scope

  • Check availability
  • Apply use test
  • Reject bad fit
  • Draft objective
  • Protect tests
  • Run with checkpoints

Next