Codex

What is the Codex /goal command and how to enable it

The /goal command in Codex lets you set a task, walk away, and return hours later to find it done. It is the official Ralph Loop in Codex. Enable it with codex features enable goals.

7 min · 2026-05-03 · Watch on YouTube

The main idea

OpenAI shipped /goal in the Codex CLI and the Codex app. One of the lead engineers who shipped it called it the most consequential thing OpenAI has ever shipped in Codex. You set a task, walk away, and come back hours later to find it done.

/goal is the official Ralph Loop implementation in Codex. The Ralph Loop goes back to early 2024, when Jeffrey Huntley wrote the original bash version. You give Codex an objective, and Codex plans, executes, tests, and refines until the goal is reached. State persists across sessions, so you can close your laptop and the goal is still alive tomorrow.

A good prompt works for a 10-minute task. For a multi-hour refactor or migration, goal is the only thing that holds the line. The goal is a first-class object attached to the thread. It has explicit states: pursuing the goal, paused, achieved, and budget limited. It survives across turns, pauses, and context compactions.

To enable it, update Codex and run codex features enable goals. In my demo I asked for a Lego Game of Thrones game set in King's Landing and north of the wall. The goal was achieved in 4 minutes. A second goal remade the game in 3D. Vincent, who maintains open claw, says goal is a constraint workflow. Give it a finish line, such as build until playable or QA until verified.

Key points

Chapters

  1. 0:43What /goal is: the official Ralph loop
  2. 2:01Isn't this just a really good prompt?
  3. 3:37How to enable /goal
  4. 3:56Live demo: Lego Game of Thrones
  5. 6:04Summary and further reading
Free live lesson · Nov 24Stop Measuring AI by Tokens. Measure What It EarnsOne hour, live, with Saurav. Bring your own bill. Free.
Save my free seat →
Get new videos and tips by emailOne short email when there is something new. Unsubscribe any time.

More CloudYeti videos