pub struct ChildRun {
pub node: NodeId,
pub graph_id: GraphId,
pub run_id: RunId,
pub root_run_id: RunId,
pub usage: UsageTotals,
}Expand description
A reference to a child run spawned from a node within an enclosing run.
Recorded when a subgraph node embeds and runs a CompiledGraph:
the child gets its own run_id while preserving the
enclosing run’s root_run_id, so a caller can
reconstruct the parent/child run lineage after a run completes. Child runs
are surfaced on GraphExecution and embedded
into the parent checkpoint metadata under a child_runs array.
Fields§
§node: NodeIdThe embedding node that ran the child graph.
graph_id: GraphIdThe graph id of the embedded child.
run_id: RunIdThe child run’s own (distinct) run id.
root_run_id: RunIdThe shared root run id of the whole recursion tree (preserved from the enclosing run).
usage: UsageTotalsToken usage rolled up from the child run, when the child reported any.
Subgraph children leave this at the default (their usage is tracked by
their own model calls); a [crate::graph::subagent_node] sub-agent child
folds the delegated harness agent’s [UsageTotals] here so it is visible
on the parent GraphExecution rollup.