OpenAI's Codex CLI v0.128.0 introduces the /goal command, enabling the coding agent to iteratively work towards a defined goal until completion or token exhaustion.
# Codex CLI 0.128.0 adds /goal
Source: [https://simonwillison.net/2026/Apr/30/codex-goals/](https://simonwillison.net/2026/Apr/30/codex-goals/)
30th April 2026 \- Link Blog
**[Codex CLI 0\.128\.0 adds /goal](https://github.com/openai/codex/releases/tag/rust-v0.128.0)**\([via](https://twitter.com/fcoury/status/2049917871799636201)\) The latest version of OpenAI's Codex CLI coding agent adds their own version of the[Ralph loop](https://ghuntley.com/ralph/): you can now set a`/goal`and Codex will keep on looping until it evaluates that the goal has been completed\.\.\. or the configured token budget has been exhausted\.
It looks like the feature is mainly implemented though the[goals/continuation\.md](https://github.com/openai/codex/blob/6014b6679ffbd92eeddffa3ad7b4402be6a7fefe/codex-rs/core/templates/goals/continuation.md)and[goals/budget\_limit\.md](https://github.com/openai/codex/blob/6014b6679ffbd92eeddffa3ad7b4402be6a7fefe/codex-rs/core/templates/goals/budget_limit.md)prompts, which are automatically injected at the end of a turn\.
Posted[30th April 2026](https://simonwillison.net/2026/Apr/30/)at 11:23 pm
## Recent articles
- [Notes on the xAI/Anthropic data center deal](https://simonwillison.net/2026/May/7/xai-anthropic/)\- 7th May 2026
- [Live blog: Code w/ Claude 2026](https://simonwillison.net/2026/May/6/code-w-claude-2026/)\- 6th May 2026
- [Vibe coding and agentic engineering are getting closer than I'd like](https://simonwillison.net/2026/May/6/vibe-coding-and-agentic-engineering/)\- 6th May 2026
This is a**link post**by Simon Willison, posted on[30th April 2026](https://simonwillison.net/2026/Apr/30/)\.
[ai2008](https://simonwillison.net/tags/ai/)[openai417](https://simonwillison.net/tags/openai/)[prompt\-engineering189](https://simonwillison.net/tags/prompt-engineering/)[generative\-ai1779](https://simonwillison.net/tags/generative-ai/)[llms1745](https://simonwillison.net/tags/llms/)[coding\-agents198](https://simonwillison.net/tags/coding-agents/)[system\-prompts54](https://simonwillison.net/tags/system-prompts/)[codex\-cli34](https://simonwillison.net/tags/codex-cli/)[agentic\-engineering48](https://simonwillison.net/tags/agentic-engineering/)
### Monthly briefing
Sponsor me for**$10/month**and get a curated email digest of the month's most important LLM developments\.
Pay me to send you less\!
[Sponsor & subscribe](https://github.com/sponsors/simonw/)
Codex introduces the /goal command, which lets the AI autonomously work toward a defined end state, streamlining long-running tasks like refactors, migrations, and retry loops.
A tweet from Greg Brockman highlights a post on using Goals in Codex to keep the AI working on a persistent objective, covering when to use them, verification criteria, and architecture design.
A community-contributed solution enabling the /goal command in Claude Code to manage session-specific objectives and concurrent workflows, similar to OpenAI Codex.
A detailed guide on using Codex's goal mode (/goal) to achieve complex coding tasks over extended periods, with tips on defining clear criteria, providing guidance, and measuring progress.