Codex CLIplanningbuilt-in

/goal

Set a persistent task goal (max 4,000 chars). Codex tracks it across turns. Subcommands: pause, resume, clear, view.

Syntax

/goal <objective> | pause | resume | clear

Example

/goal all integration tests pass with no flaky failures

When to use

  • Autonomous coding runs — set a goal and let Codex work toward it
  • Long debugging sessions where you want Codex to self-direct
  • Cross-session targets that persist through /new and /resume

More Codex CLI commands