Streams the subagent turns spawned by a session, one at a time.
Recursively scans <sessionId>/subagents/agent-<agentId>.jsonl files (CC ≥ 2.1.2),
including nested layouts (e.g. subagents/workflows/<runId>/agent-<id>.jsonl),
and yields each user/assistant turn tagged with its agentId. Memory stays
bounded — the consumer can group, filter, or process incrementally.
Yields nothing if the session has no subagents/ directory.
Parameters
projectDir: string
Absolute path to the project directory under ~/.claude/projects/<slug>/
sessionId: string
UUID of the parent session (without .jsonl extension)
Streams the subagent turns spawned by a session, one at a time.
Recursively scans
<sessionId>/subagents/agent-<agentId>.jsonlfiles (CC ≥ 2.1.2), including nested layouts (e.g.subagents/workflows/<runId>/agent-<id>.jsonl), and yields each user/assistant turn tagged with itsagentId. Memory stays bounded — the consumer can group, filter, or process incrementally.Yields nothing if the session has no
subagents/directory.