What feature would you like to see?
Could @openai/codex-sdk streaming events include explicit metadata for the agent or subagent responsible for each ThreadEvent item?
For clients that render live activity timelines, grouped logs, or debugging views, it is important to know which agent produced a message, reasoning item, tool call, todo update, or error.
Today, the TypeScript SDK exposes item types such as agent_message, reasoning, command_execution, mcp_tool_call, todo_list, and error, but those streamed items do not appear to include stable identity metadata for the active agent/subagent.
Suggested fields could include:
agent_id
agent_name
agent_kind, for example main or subagent
parent_agent_id, when applicable
parent_item_id or parent_thread_id, when applicable
This would let client applications attribute streamed activity directly, without relying on event ordering heuristics, transcript parsing, or provider-specific implementation details.
Related: #20675 covers similar root/subagent metadata for hook payloads; this request is specifically for SDK streaming ThreadEvent items.
What feature would you like to see?
Could
@openai/codex-sdkstreaming events include explicit metadata for the agent or subagent responsible for eachThreadEventitem?For clients that render live activity timelines, grouped logs, or debugging views, it is important to know which agent produced a message, reasoning item, tool call, todo update, or error.
Today, the TypeScript SDK exposes item types such as
agent_message,reasoning,command_execution,mcp_tool_call,todo_list, anderror, but those streamed items do not appear to include stable identity metadata for the active agent/subagent.Suggested fields could include:
agent_idagent_nameagent_kind, for examplemainorsubagentparent_agent_id, when applicableparent_item_idorparent_thread_id, when applicableThis would let client applications attribute streamed activity directly, without relying on event ordering heuristics, transcript parsing, or provider-specific implementation details.
Related: #20675 covers similar root/subagent metadata for hook payloads; this request is specifically for SDK streaming
ThreadEventitems.