Skip to content

Add optional parentAgentId to the session-event envelope for nested sub-agents #1731

@colbylwilliams

Description

@colbylwilliams

Sub-agent session events carry only the innermost agentId on the event envelope. When sub-agents nest, a consumer receiving the event stream cannot reconstruct parent-of relationships — there is no field linking a sub-agent to the agent that spawned it.

Today a consumer has to infer the parent indirectly, by correlating each sub-agent's id with the id of the tool call that started it. That works but is fragile and couples consumers to an implementation detail.

Request: add an explicit optional parentAgentId to the session-event envelope — absent for top-level/root agents, set to the spawning agent's id for nested sub-agents — so parent chains are recoverable directly from the event stream.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions