The /goal slash command in ๐Claude Code sets one completion condition and runs the session as a self-driving loop across turns until a separate evaluator confirms the goal is met, shipped in Claude Code 2.1.139 on May 12, 2026.
The user types /goal <condition> once, after which Claude iterates against the goal across multiple turns inside the same session, tracking elapsed time, turn count, and token spend as it runs. The evaluator runs on whichever model is configured as Claude Code's small fast model โ Haiku 4.5 by default โ which reads the transcript after each turn and decides whether the condition is satisfied. Tokens spent by the evaluator bill against the small-fast-model budget, not the main turn budget. The goal is session-scoped: it stays active in that one terminal until met or until the user types /goal clear, and works identically in interactive mode, in claude -p, and through Remote Control sessions.
/goal is Anthropic's implementation of the ๐Ralph Loop pattern that ๐Hermes Agent ships as ๐/goal and that OpenAI's Codex shipped a few weeks earlier in late April 2026 โ three independent products converging on the worker-judge-loop primitive within roughly a month. The gating heuristics for well-formed goals are the same across all three implementations: completion conditions must be measurable so the judge can evaluate them, scoped tightly enough that the loop converges in a tractable number of turns, and self-served so the worker does not stall waiting on human input.
