vigiles API reference
    Preparing search index...

    Function parseSubagents

    • Recover sub-agent runs as nested traces. A subagent-dispatch tool call (the Agent tool on the live CLI — older docs say Task — carrying an input.subagent_type) spawns a subagent whose own events the CLI tags with a top-level parent_tool_use_id = the dispatch tool-use id. We group those tagged tool calls under their dispatch, keyed by subagent_type. Schema verified against real claude output (parent_tool_use_id sibling of message, subagent_type in the dispatch input; tool named Agent) — the same message.content line shape parseToolCalls consumes, and we match the input field NOT the tool name so a future rename can't break it. Pure; empty for a harness that doesn't emit parent_tool_use_id (e.g. Codex).

      Parameters

      • streamJson: string

      Returns SubagentTrace[]