pub struct SubagentStats {
pub spawned: u64,
pub requested: SubagentSpawnRequests,
pub started_in_background: u64,
pub by_type: BTreeMap<String, u64>,
pub max_depth: u64,
pub spawned_by_subagents: u64,
pub completed: u64,
pub failed: u64,
pub killed: SubagentKillCounts,
pub refused: SubagentRefusalCounts,
}Expand description
Running totals for subagents started through the Agent tool, carried on
result frames (CLI 2.1.239+) as ResultMessage::subagent_stats.
Cumulative for the session: a resumed session starts fresh, and a
mid-session /clear zeroes it — though a background subagent that outlives
the /clear still records its outcome, so completed, failed, and
killed can then exceed spawned. Forked skills, workflows, teammates,
and other internal agents are not counted.
Fields§
§spawned: u64Subagents actually started; a refused or failed launch is not counted.
requested: SubagentSpawnRequestsSpawns by the run_in_background value the model passed; all count as
unset while the parameter is not offered.
started_in_background: u64Spawns that started in the background after defaults and session settings; the rest blocked the spawning tool call.
by_type: BTreeMap<String, u64>Spawns by agent type.
max_depth: u64Deepest spawn: 1 = started by the main thread, 2 = by a depth-1 subagent.
spawned_by_subagents: u64Spawns made from inside another subagent (depth > 1).
completed: u64§failed: u64§killed: SubagentKillCountsSubagents stopped before finishing, by who stopped them.
refused: SubagentRefusalCountsAgent tool calls turned down because a limit was reached (other denials, such as an unknown agent type, are not counted).
Trait Implementations§
Source§impl Clone for SubagentStats
impl Clone for SubagentStats
Source§fn clone(&self) -> SubagentStats
fn clone(&self) -> SubagentStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more