Bug: codex exec --json silently drops SendMessage, FollowupTask, InterruptAgent, and ListAgents collab_tool_call items

未关闭 适合新手
#64,533 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@akhil9tiet 已经在做这个了。

开始于 2026年11月29日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
cli

调研方向

从 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 内容生成。

描述

bug CLI exec subagent
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
  1. Run codex exec --json on a multi-agent workflow that invokes send_message, followup_task, interrupt_agent, or list_agents (e.g., spawning subagents and sending a follow-up task or listing active agents).
  2. Inspect the emitted JSONL stream: spawn_agent / wait / close_agent appear as collab_tool_call items, whereas send_message, followup_task, interrupt_agent, and list_agents produce no item.started or item.completed events 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openai/codex 的其他 Issue

查看 openai/codex 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。