Codex 支持两种计划工作方式。Scheduled Tasks 每次运行创建新线程,适合无需上下文延续的任务,如每日 9 点自动总结邮件、日历;Scheduled Messages 在同一现有线程反复运行,适合需要历史上下文的场景,如每 30 分钟检查 PR 状态并处理评论,直至合并。推文还给出创建可复用循环技能的提示词,让 Codex 自动判断使用哪种方式并引导用户填写关键参数。
http://x.com/i/article/2071134358359187456
Two kinds of scheduled work in Codex
You want Codex to do something later, or keep checking something until it changes. That sounds like one feature. It is actually two different kinds of work, and the difference is simple:
- Scheduled Tasks create a new thread every time they run.
- Scheduled Messages use the same existing thread every time they run.
Use a Scheduled Task when every run can start fresh
A Scheduled Task is best when the job makes sense without the conversation that created it.
For example:
Every morning at 9 AM, summarize what I need to catch up on from my email, calendar, and team messages.
Tomorrow's summary does not need to remember today's summary. It needs the same instructions, current information, and a fresh place to report the result.
Use a Scheduled Message when the next check needs the thread
A Scheduled Message, sometimes called a thread automation or heartbeat automation, returns to the same existing thread each time it runs.
For example:
Check this PR every 30 minutes. If there are comments, address them and keep CI green. Stop when the PR merges.
The next check depends on the work that already happened. The thread knows which PR you mean, which comments were addressed, what failed in CI, and what has changed since the last check.