You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aictrl run --format json reports subagent_start for child sessions created by the task tool. The child's model usage (input, output, reasoning and cache tokens) never shows up in the NDJSON, so the totals a consumer adds up from message_complete events undercount every run that delegates. This is the same on 0.4.8 and the 0.5.0 candidate.
In the benchmark's subagent search task, the parent's reported usage covered only the parent's own turns.
Proposal
Without changing the meaning of the parent's events, do one of the following:
A. Emit the child's message_complete (or a dedicated subagent_usage) with its sessionID / subagentSessionID.
B. Add a subagent_complete event carrying the child's aggregated usage.
Whichever is chosen, document in EVENTS.md how to compute the total cost of a run.
Acceptance criteria
A fake-provider test whose run delegates through task reports the child's tokens, and a consumer can sum parent + children to get the provider-side total.
Activity
fix(run): report subagent token usage as subagent_message_complete (#213
Merge pull request #221 from aictrl-dev/fix/issue-213-subagent-usage