Subagent/Workflow task-notification usage block reports only combined tokens, no input/output split

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 11, 2026

Description

When a background Agent or Workflow call completes, the task-notification's <usage> block reports a single combined subagent_tokens figure:

<usage><subagent_tokens>212532</subagent_tokens><tool_uses>94</tool_uses><duration_ms>752467</duration_ms></usage>

The underlying Messages API already returns input_tokens, output_tokens, cache_creation_input_tokens, and cache_read_input_tokens separately per request. Since input and output tokens are priced roughly 5x apart on most models, a combined figure makes it impossible to compute an accurate cost for a subagent/workflow run — only a wide floor/ceiling bound can be derived (e.g. a 300K-token run priced between ~$0.60 and ~$4.51 depending on the unknown split).

Ask

Surface input_tokens/output_tokens (and ideally cache tokens) separately in the <usage> block for Agent and Workflow task-notifications, matching the granularity already shown in /usage's session-level stats panel. This would let anyone building cost tracking or evaluation tooling on top of Agent/Workflow get real cost numbers instead of wide estimates.

View original on GitHub ↗