Skip to main content

subagent_sidecars

Function subagent_sidecars 

Source
fn subagent_sidecars(
    session_id: &str,
    transcript: &Path,
) -> (Vec<(String, Vec<SessionMessage>)>, HashMap<String, SidecarLink>)
Expand description

The frames a session’s sub-agent sidecars hold, with each sidecar’s own dispatch and every meta’s chain link. The links are read for all sidecars, not only the ones inside the budget; the fold stamps the rows themselves.

The CLI writes a sub-agent’s own frames to <session>/subagents/agent-<id>.jsonl and names the dispatch and its parent agent in the sibling .meta.json; neither is in the session transcript, so a resumed conversation drew every card as its dispatch alone until this read folded them in (#1763). Newest sidecars first, up to SIDECAR_BUDGET_BYTES; a sidecar whose body cannot be read, or falls past the budget, keeps the dispatch alone, while its meta still links a nested child whose body is inside the budget. A meta that cannot be parsed records no link.