Codex shipped /goal in 0.128.0 a couple days ago. I was planning to build something like this for Msty Claw eventually, but seeing it land in Codex moved it up the list. Competitive paranoia is a valid product strategy.
The idea is simple. You give the agent a goal once, and it keeps working on it across multiple turns until the goal is done, you pause it, or it hits a turn budget. The agent nudges itself with continuation prompts. You do not have to keep typing “keep going” or “what about the next part.”
This pattern has a name. Geoffrey Huntley coined the term “Ralph loop.” It is named after Ralph Wiggum from The Simpsons — the kid who wanders into a situation, announces “I’m helping,” and keeps at it regardless of what is happening around him. Undeterred. Unkillable. Cheerfully unaware that stopping is an option. The agent, basically.
What /goal does
You set a standing objective:
/goal Refactor the auth module to use JWT instead of session cookies
From there, the app takes over the continuation loop. After each assistant turn, a lightweight supervisor judges whether the goal is satisfied. If not, it queues the next step automatically. If the agent explicitly says the goal is complete, that is detected directly without an extra model call.
The state lives on the session. Goal text, status (active/paused/done), turns used, max turns, timestamps, and the last verdict. Not a transient UI thing.
Default budget is 42 turns. You can change it mid-run:
/goal limit 20
The rest of the commands:
/goal statussee where things stand/goal pausefreeze the loop/goal resumepick it back up/goal clearkill the goal entirely
You can check status, pause, resume, clear, or adjust the limit while the assistant is mid-turn. Setting a new goal while the assistant is running is blocked. You have to clear first.
The continuation loop
The continuation prompt is queued internally. It includes the standing goal text and asks for the next concrete step. It is not typed by you, and it does not override any normal prompt you send. If you type something while a goal is active, your message goes first and the goal continuation waits.
Each continuation has metadata so stale ones can be detected and skipped. If you clear or change the goal while a continuation is in flight, the old one gets discarded. Same for mid-run limit changes. The system re-reads the latest goal state before persisting any decision.
The supervisor
“Supervisor” is a lightweight goal judge, not the main assistant. After each assistant turn it looks at two things. The standing goal text and the latest response. It answers one question: is this goal satisfied yet?
Output is done or continue, plus a short reason.
There is a fast path. If the assistant explicitly says “goal is complete,” the system marks it done without calling the supervisor at all. This avoids an extra model call on the easy cases. It guards against false positives too. “Not complete” and “incomplete” do not trigger it.
If the supervisor errors or returns garbage, it fails open as continue. A broken judge should not kill an in-progress goal.
The supervisor uses whatever provider and model you have selected. No hidden model dependency.
Budget and blocking
After each supervisor verdict, if the goal is still active but the turn count has hit the budget, it pauses with a “budget exhausted” status instead of queueing another turn. You can raise the limit and resume.
Works in regular chats and bot conversations the same way.
The race guards around stale continuations and mid-run limit changes are the part I am least sure about. Concurrency between user actions and background supervisor calls is where the subtle bugs live. We will see what happens in practice.
Claw 0.4.0 was about making agent workflows easier to keep running. Local bots, manual compaction, better Windows support. /goal is the next step in the same direction. Set the direction, let the agent run, check back when it is done or stuck.