Codex CLI 0.128.0 ships /goal — OpenAI's take on the Ralph loop
OpenAI’s Codex CLI coding agent gained a /goal command in version 0.128.0 that turns the tool into a self-directed loop. Once a goal is set, Codex keeps iterating until it judges the goal complete or the configured token budget runs out, mirroring the pattern community users have been calling the Ralph loop.
The implementation is notably lightweight: the behaviour appears to be driven primarily by two prompt files, goals/continuation.md and goals/budget_limit.md, which are injected at the end of each turn to steer the model into either continuing or stopping. That makes /goal less a new engine and more a prompt-orchestration layer riding on top of the existing turn loop, with token budgets serving as the hard backstop against runaway agents.
Read the full article
Continue reading at Simon Willison →This is an AI-generated summary. Read the original for the full story.