The parent’s transcript
Delegation shows up in the assistant messageparts of the parent session. The agent’s message_agent tool call is a normal tool_invocation part. Each subagent it launched is a subagent_invocation part whose parentToolCallId is that tool call, and whose child_session_id is the subagent’s session:
result.args.nameis the task the agent gave the subagent;gummieIdis the agent that ran it.result.result.statusiscompleted,error,timeoutoraborted. For a subagent the parent waited on,result.result.responseis the subagent’s final answer.is_background: truemeans the parent did not wait. Its launch part completes as soon as the subagent is dispatched, withresponse: null; the subagent’s answer arrives later as atool_invocationpart namedsubagent_resultwith the samechild_session_id, placed where the parent received it. Atool_invocationpart namedsubagent_messageis a note a subagent sent the parent mid-run.
parentToolCallId under its tool call, and every subagent_result or subagent_message with the same child_session_id under its launch. timestamp and completedAt order them.
Open a subagent’s session
Passchild_session_id to Retrieve session. The child comes back in the same shape as any session, with type: "subagent" and parent_session_id pointing back at the parent. If the subagent delegated further, its own transcript carries subagent_invocation parts of its own.
List a session’s subagents
Subagent sessions are hidden from the unfiltered List sessions response. Pass the parent’s ID asparent_session_id to list them, with their state and usage:
Live events
When you stream a session, the parent’s event stream reports each subagent as it starts and finishes.subagent-started carries interactionId (the child session), name, gummieId, parentToolCallId, is_background and mode; subagent-completed carries interactionId, status, result and error, plus completedAt and durationMs. The subagent’s own text does not stream on the parent; open the child session for it.