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

オープン 初心者向け
#64,533 コメント 2 件 リアクション 0 件 担当者 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 の、4つの破棄された呼び出しに対して None を返す CollabAgentTool の match の周辺から始めます。codex-rs/exec/src/exec_events.rs に不足している CollabTool のバリアントを追加し、その後、processor で各バリアントをマッピングします。関連する codex-rs/exec のテストを実行し、JSONL ストリームが 4 つの呼び出しすべてに対して 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分
マージ済み PR(30日)
999

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openai/codex のほかの issue

openai/codex の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。