first commit
This commit is contained in:
39
research/async-agent-loop-timeline.md
Normal file
39
research/async-agent-loop-timeline.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# 异步 Agent Loop 的产品时间线
|
||||
|
||||
异步提问让 Agent 发出 `question` 后继续做不依赖答案的工作。Agent 走到需要答案的步骤时可以等待,收到答案再推进。**2026 年 9 月已有明确的 API 和 Codex CLI 发布记录。** 两者的回传协议不同,Responses API 的原生异步函数通过原 `call_id` 回传工具结果,Codex CLI 的提问工具先返回 `accepted`,实际答复随后作为带问题 ID 的用户输入进入会话。表内 PR 合并时间以北京时间计,厂商发布日志保留页面日期。 [Responses API 回传示例](https://developers.openai.com/api/docs/guides/async-tool-calling#return-the-users-answer)、[Codex CLI 请求快照](https://github.com/openai/codex/blob/rust-v0.167.1/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_async_question_and_answer.snap#L38-L50)
|
||||
|
||||
## 异步提问
|
||||
|
||||
- **2026-09-03**,OpenAI Responses API 为 GPT-6 Astra 发布异步工具调用。开发者可把自己的提问工具声明为 `async: true`,由应用显示问题、保存待回答状态并送回结果。 [API 发布记录](https://developers.openai.com/api/docs/changelog?mw_entry=2026-09-03-3f56515da8b13ccc)、[异步提问示例](https://developers.openai.com/api/docs/guides/async-tool-calling#add-a-tool-to-ask-the-user-for-input)
|
||||
- **2026-09-03**,Codex CLI 0.153.0 的发布记录列出 `request_user_input_async`,由模型目录启用。**2026-09-09**,CLI 0.154.0 的终端界面支持边工作边收取选项或自由文本回答。 [Codex CLI 0.153.0](https://learn.chatgpt.com/docs/changelog?date=2026-09-03#:~:text=Structured%20asynchronous%20questions)、[Codex CLI 0.154.0](https://learn.chatgpt.com/docs/changelog?date=2026-09-09#:~:text=Answer%20questions%20inline)
|
||||
- **OpenCode** 的内置 `question` 依照当前文档会暂停执行,等用户填写表单后返回答案。11 月的两条 PR 分别涉及后台 Shell 和 ACP 客户端发送新指令。 [OpenCode `question` 文档](https://opencode.ai/docs/tools/#question)、[OpenCode `question` 实现](https://github.com/anomalyco/opencode/blob/b451fe3952b649881d13e9c3534edb61c2767b8e/packages/core/src/tool/plugin/question.ts#L62-L108)
|
||||
|
||||
## Steer、Queue 和后台执行
|
||||
|
||||
Steer 把新的用户输入送给当前运行,Queue 把新输入留给下一轮。2025 年夏秋的发布记录已经能看到这些交互和后台命令。Codex CLI 的异步答复也可走 Steer,答复内的问题 ID 保留了和原问题的关联。上游场景测试覆盖了在当前轮处理这类答复。 [Codex Steer 和 Queue](https://learn.chatgpt.com/docs/prompting#steering-and-queuing)、[Codex CLI 场景测试](https://github.com/openai/codex/blob/rust-v0.167.1/codex-rs/core/tests/suite/scenarios.rs#L893-L910)
|
||||
|
||||
## Cursor 和 Claude Code
|
||||
|
||||
| 时间 | 产品 | 已公开的能力 |
|
||||
| --- | --- | --- |
|
||||
| 2025 年 5 月至 6 月 | Cursor 0.50、1.0 | Background Agent 从预览到 GA。整只 Agent 在独立远端环境执行,可并行派活、查看和跟进。 [0.50](https://cursor.com/changelog/0-50)、[1.0](https://cursor.com/changelog/1-0) |
|
||||
| 2025-07-03 | Cursor 1.2 | 可在 Agent 工作期间提交追问,当前任务结束后按队列执行。 [Queued messages](https://cursor.com/changelog/1-2#queued-messages) |
|
||||
| 2025-08-06 | Cursor 1.4 | 区分 Queue、Steer、Interrupt。Steer 通常在一次工具调用之后生效。 [More Agent steerability](https://cursor.com/changelog/1-4#more-agent-steerability) |
|
||||
| 2025 年 8 月 | Claude Code 1.0.71 | `Ctrl+B` 把 Bash 命令移到后台,Claude 可以继续工作。 [Claude Code 1.0.71](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#1071) |
|
||||
| 2025-10-15 | Claude Code 2.0.19 | 长时间运行的 Bash 命令在达到前台超时后自动转后台,保留原进程。 [Claude Code 2.0.19](https://code.claude.com/docs/en/changelog#:~:text=Auto-background%20long-running%20bash%20commands) |
|
||||
| 2026-08-19 | Cursor | 发布说明强调运行中的追问在工具边界进入,避免切断当时的动作。 [Steering improvements](https://cursor.com/changelog/08-19-26#steering-improvements) |
|
||||
| 2026-09-23 | Claude Code 2.1.281 | Send now 改为先把运行中的工具移到后台,再处理新输入。 [Claude Code 2.1.281](https://code.claude.com/docs/en/changelog#:~:text=Changed%20send%20now) |
|
||||
|
||||
## OpenCode
|
||||
|
||||
- **2026-05-15**,PR #27084 合入实验性后台子 Agent。父会话可拿到后台子 Agent 的结果。 [OpenCode #27084](https://github.com/anomalyco/opencode/pull/27084)
|
||||
- **2026-06-30 至 07-13**,V2 的通用 Job 服务将结果通知交给各工具。7 月初的 PR 已验证用 `Ctrl+B` 将运行中的 shell 放到后台。7 月 13 日的 TUI 修复描述了已有完成通知经持久化 inbox 唤醒原会话的路径。10 月公开的 OpenCode 2.0 介绍也展示了后台 shell、继续发消息和结果回报。 [OpenCode #34559](https://github.com/anomalyco/opencode/pull/34559)、[OpenCode #35320](https://github.com/anomalyco/opencode/pull/35320)、[OpenCode #36534](https://github.com/anomalyco/opencode/pull/36534)、[OpenCode 2.0 Background Tasks](https://anoma.ly/notes/opencode-2-0/#background-tasks)
|
||||
- **2026-11-09 13:32**,PR #54394 把已有的同会话 steering 接到 ACP 临时扩展 `_session/steering`。运行中的 Loop 在下一步读取消息。空闲时接口提示客户端发普通 prompt。 [OpenCode #54394](https://github.com/anomalyco/opencode/pull/54394)
|
||||
- **2026-11-11 00:31**,PR #63024 合入 `dev`。开启 `shell_timeout_background` 时,shell 超过默认 120 秒前台等待预算后自动把同一进程转到后台,完成后复用已有通知路径。合并时本地和开发构建默认开启,发行构建默认关闭。 [OpenCode #63024](https://github.com/anomalyco/opencode/pull/63024)
|
||||
|
||||
## Codex
|
||||
|
||||
- **2025-09-11**,Codex CLI #3288 合入实验性的 PTY 执行工具。会话 ID 可供后续读取或交互,建立了长命令可跨工具调用存活的基础。 [Codex #3288](https://github.com/openai/codex/pull/3288)
|
||||
- **2026-01-13**,Codex CLI #9077 合入运行中默认发送消息,Tab 用于排队。**2026-02-05**,Codex 桌面版 26.205 发布记录明确列出 mid-turn steering。 [Codex #9077](https://github.com/openai/codex/pull/9077)、[Codex app 26.205](https://learn.chatgpt.com/docs/changelog?date=2026-02-05&index=0)
|
||||
- **2026-09-29**,CLI 0.159.0 增加可选的 `instant_interrupt`,让新输入可以在模型响应或长时间 Code Mode 调用期间导入。**2026-10-15**,CLI 0.163.0 的发布记录列出响应期间的即时 steering。 [Codex CLI 0.159.0](https://learn.chatgpt.com/docs/changelog?date=2026-09-29)、[Codex CLI 0.163.0](https://learn.chatgpt.com/docs/changelog?date=2026-10-15)
|
||||
- App Server 文档列有 `turn/steer` 和后台终端相关接口。CLI 0.167.1 的 `exec_command` 在等待预算耗尽时可返回 process ID,退出监听器把完成事件发回原 turn。桌面版是否在普通命令结束后自动开启一次模型续跑仍待实测。T3 Code 的适配器会对符合条件的后台命令另行提交续跑通知。 [Codex App Server](https://learn.chatgpt.com/docs/app-server#api-overview)、[返回 process ID](https://github.com/openai/codex/blob/rust-v0.167.1/codex-rs/core/src/unified_exec/process_manager.rs#L651-L667)、[退出事件](https://github.com/openai/codex/blob/rust-v0.167.1/codex-rs/core/src/unified_exec/async_watcher.rs#L327-L379)、[T3 Code 的完成处理](https://github.com/pingdotgg/t3code/blob/a536ff7ac0c080190f098965d0a0d244caf5b211/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts#L5179-L5238)
|
||||
Reference in New Issue
Block a user