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

Đang mở Phù hợp với người mới
#64,533 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@akhil9tiet đang làm issue này rồi.

Từ ngày 29/11/2026.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu trong codex-rs/exec/src/event_processor_with_jsonl_output.rs, quanh match CollabAgentTool trả về None cho bốn lệnh gọi bị loại bỏ. Thêm các biến thể CollabTool còn thiếu trong codex-rs/exec/src/exec_events.rs, sau đó ánh xạ từng biến thể trong processor. Chạy các test liên quan của codex-rs/exec và xác minh rằng luồng JSONL phát ra sự kiện collab_tool_call cho cả bốn lệnh gọi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Rust
Star
136k
Fork
21.6k
Merge trung bình
1 phút
Pull request đã merge (30 ngày)
999

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của openai/codex

Tất cả issue của openai/codex

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.