Bug: codex exec --json silently drops SendMessage, FollowupTask, InterruptAgent, and ListAgents collab_tool_call items
维护者通常 1 天内回复
@akhil9tiet 已经在做这个了。
开始于 2026年11月29日。
评估
调研方向
从 codex-rs/exec/src/event_processor_with_jsonl_output.rs 中对四个被丢弃的调用返回 None 的 CollabAgentTool match 附近开始。在 codex-rs/exec/src/exec_events.rs 中添加缺少的 CollabTool 变体,然后在 processor 中映射每个变体。运行相关的 codex-rs/exec 测试,并验证 JSONL 流为四个调用都发出 collab_tool_call 事件。
由索引模型根据 Issue 内容生成。
描述
Version / Commit
- Observed in:
codex-cli 0.172.0(codex exec --json) - Verified on
main(065e18b)
Summary
In codex exec --json, multi-agent collaboration tool calls for SendMessage, FollowupTask, InterruptAgent, and ListAgents are silently dropped (return None) instead of being serialized as collab_tool_call JSONL events. Only SpawnAgent, SendInput, ResumeAgent, Wait, and CloseAgent are emitted.
Because codex exec --json is the machine-readable event stream for headless automation, CI, and trajectory auditing, dropping these four tool call types makes multi-agent handoffs and follow-up tasks invisible to downstream consumers.
Source Location (main @ 065e18b)
codex-rs/exec/src/event_processor_with_jsonl_output.rs:233-256:
ThreadItemPayload::CollabAgentToolCall {
tool,
sender_thread_id,
receiver_thread_ids,
prompt,
agents_states,
status,
..
} => Some(ExecThreadItem {
id: make_id(),
details: ThreadItemDetails::CollabToolCall(CollabToolCallItem {
tool: match tool {
CollabAgentTool::SendMessage
| CollabAgentTool::FollowupTask
| CollabAgentTool::InterruptAgent
| CollabAgentTool::ListAgents => return None,
CollabAgentTool::SpawnAgent => CollabTool::SpawnAgent,
CollabAgentTool::SendInput => CollabTool::SendInput,
...
Reproduction
- Run
codex exec --jsonon a multi-agent workflow that invokessend_message,followup_task,interrupt_agent, orlist_agents(e.g., spawning subagents and sending a follow-up task or listing active agents). - Inspect the emitted JSONL stream:
spawn_agent/wait/close_agentappear ascollab_tool_callitems, whereassend_message,followup_task,interrupt_agent, andlist_agentsproduce noitem.startedoritem.completedevents at all.
(Observed during TraceTrial-Bench Core-95 multi-agent evaluation on C6-infra-research-subagent-001 with [email protected].)
Expected Behavior
Add the corresponding CollabTool variants in codex-rs/exec/src/exec_events.rs (SendMessage, FollowupTask, InterruptAgent, ListAgents) and map them in event_processor_with_jsonl_output.rs so all multi-agent collaboration tool calls are faithfully represented in codex exec --json.
Related: #53017 (SDK TypeScript item types vs. exec JSONL wire format).
- 主要语言
- Rust
- 星标
- 136k
- 派生
- 21.6k
- 平均合并
- 1 分钟
- 30 天内合并 PR
- 999
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openai/codex 的其他 Issue
-
bug CLI subagent
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
bug CLI exec subagent
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug CLI subagent
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
WebSocket client ignores x-codex-turn-state in codex.response.metadata可能已有人在做 @akhil9tiet 今天认领。 未关闭bug CLI connectivity
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
bug CLI
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
nightly-cleanup
难度 2/5 1-3 小时 新手友好度 78/100
max-sixty/worktrunk#4939 · 1 个 reaction ·
维护者通常 1 天内回复
-
flaky
难度 2/5 1-3 小时 新手友好度 68/100
stacks-network/stacks-core#7918 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
rust-bitcoin/rust-bech32#339 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
databendlabs/openraft#2554 · 1 条评论 ·
维护者通常 1 天内回复
-
autofixer: follow-up
难度 2/5 1-3 小时 新手友好度 78/100
tursodatabase/turso#12683 ·
维护者通常 1 天内回复