Skip to content

@openai/codex-sdk: ThreadItem type missing collab_tool_call #28318

Open

Description

@chrisyy2003

What happened?

@openai/codex-sdk emits collab_tool_call items at runtime when subagents are used, but the exported TypeScript ThreadItem union does not include this item type.

Checked versions:

Runtime event example:

{
  "type": "item.completed",
  "item": {
    "id": "item_0",
    "type": "collab_tool_call",
    "tool": "spawn_agent",
    "sender_thread_id": "019ecb5a-ce95-7653-9214-6d152cd7f5e3",
    "receiver_thread_ids": ["019ecb5b-0644-7500-9f5e-317a21ad58a4"],
    "agents_states": {
      "019ecb5b-0644-7500-9f5e-317a21ad58a4": {
        "status": "pending_init",
        "message": null
      }
    },
    "status": "completed"
  }
}

Expected behavior

The TypeScript SDK should export a CollabToolCallItem type and include it in ThreadItem.

The Rust exec event source already appears to define this as CollabToolCallItem in codex-rs/exec/src/exec_events.rs, and the runtime emits it correctly.

Why this matters

Subagent tracing works at runtime, but TypeScript consumers have to cast event.item to unknown / any to handle official SDK events. This makes subagent trace parsing unnecessarily unsafe.

Activity

  1. added
    bug
    app-server
    subagent
    on Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app-serverbugsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions