---
title: "Codex CLI 0.128.0 adds /goal"
source_name: "Simon Willison's Weblog"
original_url: "https://simonwillison.net/2026/Apr/30/codex-goals/#atom-everything"
canonical_url: "https://www.traeai.com/articles/6b65288e-3271-4abc-9c73-cc3fe18e6b44"
content_type: "article"
language: "中文"
score: 8
tags: ["OpenAI","Codex CLI","prompt engineering","coding agents"]
published_at: "2026-04-30T23:23:17+00:00"
created_at: "2026-05-01T04:28:13.938546+00:00"
---

# Codex CLI 0.128.0 adds /goal

Canonical URL: https://www.traeai.com/articles/6b65288e-3271-4abc-9c73-cc3fe18e6b44
Original source: https://simonwillison.net/2026/Apr/30/codex-goals/#atom-everything

## Summary

OpenAI的Codex CLI 0.128.0版本引入了/goal功能，允许用户设置目标，Codex将持续循环执行直至达成目标或令牌预算耗尽，类似于Ralph loop。

## Key Takeaways

- 新版本Codex CLI增加了/goal命令，实现持续任务执行至目标完成。
- 该功能通过自动注入goals/continuation.md和goals/budget_limit.md模板实现。
- 此更新强化了Codex作为编码代理的能力，特别是在有明确目标的任务上。

## Content

Title: Codex CLI 0.128.0 adds /goal

URL Source: http://simonwillison.net/2026/Apr/30/codex-goals/

Published Time: Fri, 01 May 2026 03:47:22 GMT

Markdown Content:
# Codex CLI 0.128.0 adds /goal

# [Simon Willison’s Weblog](http://simonwillison.net/)

[Subscribe](http://simonwillison.net/about/#subscribe)

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 "@fcoury")) 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](http://simonwillison.net/2026/Apr/30/) at 11:23 pm

## Recent articles

*   [LLM 0.32a0 is a major backwards-compatible refactor](http://simonwillison.net/2026/Apr/29/llm/) - 29th April 2026
*   [Tracking the history of the now-deceased OpenAI Microsoft AGI clause](http://simonwillison.net/2026/Apr/27/now-deceased-agi-clause/) - 27th April 2026
*   [DeepSeek V4 - almost on the frontier, a fraction of the price](http://simonwillison.net/2026/Apr/24/deepseek-v4/) - 24th April 2026

This is a **link post** by Simon Willison, posted on [30th April 2026](http://simonwillison.net/2026/Apr/30/).

[ai 1995](http://simonwillison.net/tags/ai/)[openai 416](http://simonwillison.net/tags/openai/)[prompt-engineering 189](http://simonwillison.net/tags/prompt-engineering/)[generative-ai 1768](http://simonwillison.net/tags/generative-ai/)[llms 1734](http://simonwillison.net/tags/llms/)[coding-agents 197](http://simonwillison.net/tags/coding-agents/)[system-prompts 54](http://simonwillison.net/tags/system-prompts/)[codex-cli 34](http://simonwillison.net/tags/codex-cli/)[agentic-engineering 46](http://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/)

*   [Disclosures](http://simonwillison.net/about/#disclosures)
*   [Colophon](http://simonwillison.net/about/#about-site)
*   ©
*   [2002](http://simonwillison.net/2002/)
*   [2003](http://simonwillison.net/2003/)
*   [2004](http://simonwillison.net/2004/)
*   [2005](http://simonwillison.net/2005/)
*   [2006](http://simonwillison.net/2006/)
*   [2007](http://simonwillison.net/2007/)
*   [2008](http://simonwillison.net/2008/)
*   [2009](http://simonwillison.net/2009/)
*   [2010](http://simonwillison.net/2010/)
*   [2011](http://simonwillison.net/2011/)
*   [2012](http://simonwillison.net/2012/)
*   [2013](http://simonwillison.net/2013/)
*   [2014](http://simonwillison.net/2014/)
*   [2015](http://simonwillison.net/2015/)
*   [2016](http://simonwillison.net/2016/)
*   [2017](http://simonwillison.net/2017/)
*   [2018](http://simonwillison.net/2018/)
*   [2019](http://simonwillison.net/2019/)
*   [2020](http://simonwillison.net/2020/)
*   [2021](http://simonwillison.net/2021/)
*   [2022](http://simonwillison.net/2022/)
*   [2023](http://simonwillison.net/2023/)
*   [2024](http://simonwillison.net/2024/)
*   [2025](http://simonwillison.net/2025/)
*   [2026](http://simonwillison.net/2026/)
