Codex 的 /goal 功能:如何将四小时的任务变成一键设置并忘记的任务

TL;DR · AI 摘要
Claire Vo 在 Lenny's Newsletter 中介绍了一个名为 Codex 的 AI 工具中的 /goal 功能,该功能允许用户设置长期任务并在后台自动运行,无需持续干预。
核心要点
- /goal 功能可以让用户将长时间复杂任务自动化,无需持续干预。
- 通过设置目标并使用六部分框架,可以编写出有效的 /goal 提示,确保可衡量的结果和验证方法。
- 非技术人员也可以利用 /goal 功能进行邮件清理和项目管理任务的组织。
结构提纲
按章节快速跳转。
思维导图
用一张图看清主题之间的关系。
查看大纲文本(无障碍 / 无 JS 友好)
- Codex 的 /goal 功能
- 定义与用途
- 自动化长时间任务
- 无需持续干预
- 区别于标准提示
- 目标循环与提示的区别
- 实际案例
- 消除 Sentry 错误
- 清理邮件
- 组织项目管理任务
- 编写有效目标提示
- 六部分框架
- 目标生命周期管理
- 查看
- 暂停
- 恢复
- 清除
金句 / Highlights
值得收藏与分享的关键句。
/goal 功能允许用户设置长期任务并在后台自动运行,无需持续干预。
通过设置目标并使用六部分框架,可以编写出有效的 /goal 提示,确保可衡量的结果和验证方法。
非技术人员也可以利用 /goal 功能进行邮件清理和项目管理任务的组织。
Codex Goals: How to turn 4-hour tasks into set-it-and-forget-it workflows
Playback speed
1×
Subtitles
Share post
Share post at current time
Share from 0:00
0:00
/
Transcript
0:04
Claire Vo
Welcome back to How I AI. I'm Claire Vo, product leader and AI obsessive here on a mission to help you build better with these new tools. Today, I'm going to walk through my favorite feature in my most recent favorite AI product, Goals in Codex.
0:20
If you've been wondering how all these people on the timeline are getting their AI to run quote unquote overnight or handle very complex long running tasks, I'm going to show you goals is the answer. we're going to walk through what it is how i might use it and a technical use case
0:37
along with some non-technical examples of how goals can help you even if you're not coding let's get to it this episode is brought to you by mercury as an ai founder i'm constantly tracking run rate watching revenue growth Paying vendors and making sure I'm getting paid on time Mercury makes all of it
0:56
feel effortless The app is genuinely beautiful It actually looks and works like modern software which sounds obvious but apparently isn't when it comes to banking What I use it for the most? bill pay for my vendors is just clean and easy and wires and transfers getting paid
1:15
from clients moving money mercury makes it so simple everything you need is right there no phone calls no hunting through menus no wondering if something went through I think about how much I've optimized every other tool in my stack mercury is the one where I don't have to think about it at all it just works
The Codex feature that works while you sleep
🎙️I break down the /goal feature in Codex, including a live demo, three real use cases, and the 6-part framework for writing goals that actually run
May 27, 2026
Transcript
In this 30-minute episode, I walk through my favorite feature in Codex: the /goal command. I show how Goals transform AI from a turn-based assistant that needs constant ‘what’s next?’ prompting into an autonomous agent that can work for hours on complex, multi-step tasks. I share three real examples: eliminating thousands of Sentry errors, cleaning 3,900 emails down to 68, and organizing hundreds of Linear tasks.
Listen or watch on [YouTube](https://youtu.be/2wLJl9A2CnA), [Spotify](https://open.spotify.com/show/4aRP2XSavdtrLG5FZoonOK), or [Apple Podcasts](https://podcasts.apple.com/us/podcast/how-i-ai/id1809663079)
What you’ll learn:
- What Goals are and how they differ from standard prompts
- How I used /goal to eliminate hundreds of error logs in my codebase over a five-hour autonomous run
- The non-technical use cases that make Goals incredibly powerful: cleaning up 3,900 emails in under four hours and organizing hundreds of project management tasks in Linear
- How to write effective /goal prompts with measurable outcomes, verification methods, and constraints
- When not to use Goals and what makes a strong versus weak Goal
- Why Goals represent a fundamental shift in how we work with AI, from babysitting the model to managing it
- * *
Brought to you by:

[Mercury](https://mercury.com/)—Radically different banking loved by over 300K entrepreneurs
In this episode, we cover:
(00:00) Introduction
(01:50) What is /goal and when should you use it?
(02:45) The difference between prompts and Goal-based loops
(04:06) Claire’s first five-hour 45-minute autonomous coding task
(05:05) How to manage a Goal lifecycle: view, pause, resume, and clear
(06:06) How to write strong goals: outcomes vs. outputs
(07:34) The six components of effective Goals
(08:57) Example: Reducing P95 checkout latency with /goal
(09:36) Demo: Using /goal to eliminate Sentry errors in ChatPRD
(13:18) Demo: Burning down Vercel API errors
(17:28) Non-technical use case: Cleaning 3,900 emails with /goal
(21:24) Demo: Using /goal to clean up Linear project tasks
(24:41) When _not_ to use /goal
(26:10) Why /goal changes everything
Tools referenced:
• Codex: https://openai.com/codex/
• Sentry: https://sentry.io/
• Vercel: https://vercel.com/
• Linear: https://linear.app/
Other reference:
• OpenAI blog post “Using Goals in Codex”: https://developers.openai.com/cookbook/examples/codex/using_goals_in_codex
Where to find Claire Vo:
ChatPRD: https://www.chatprd.ai/
Website: https://clairevo.com/
LinkedIn: https://www.linkedin.com/in/clairevo/
Production and marketing by https://penname.co/. For inquiries about sponsoring the podcast, email jordan@penname.co.
#### Discussion about this video
Comments Restacks

How I AI
How I AI, hosted by Claire Vo, is for anyone wondering how to actually use these magical new tools to improve the quality and efficiency of their work. In each episode, guests will share a specific, practical, and impactful way they’ve learned to use AI in their work or life. Expect 30-minute episodes, live screen sharing, and tips/tricks/workflows you can copy immediately. If you want to demystify AI and learn the skills you need to thrive in this new world, this podcast is for you.
How I AI, hosted by Claire Vo, is for anyone wondering how to actually use these magical new tools to improve the quality and efficiency of their work. In each episode, guests will share a specific, practical, and impactful way they’ve learned to use AI in their work or life. Expect 30-minute episodes, live screen sharing, and tips/tricks/workflows you can copy immediately. If you want to demystify AI and learn the skills you need to thrive in this new world, this podcast is for you.
Listen on
Substack App
Apple Podcasts
Spotify
YouTube
Overcast
Pocket Casts
RSS Feed
Appears in episode
Writes Claire’s SubstackSubscribe
Recent Episodes

How the engineer behind Claude Cowork actually uses Claude | Felix Rieseberg (Anthropic)
May 25•Claire Vo

What launched at Google I/O 2026 (30-minute day 1 recap)
May 20•Claire Vo

HTML is the new Markdown: How Anthropic engineers are building with Claude Code | Thariq Shihipar
May 18•Claire Vo

Spec-driven development: The AI engineering workflow at Notion | Ryan Nystrom
May 11•Claire Vo

Code with Claude: The 5 biggest updates explained
May 7•Claire Vo

May 6•Claire Vo

The internal AI tool that’s transforming how Stripe designs products | Owen Williams
May 4•Claire Vo