mattpocock/harness-claude-code-usage-repro: Repro: @ai-sdk/harness-claude-code finish-step reports the whole turn's cumulative usage on the last step, not that step's own
Why CEREBRO kept it
Claude Code SDK usage reporting bug.
The text below is an automated extraction of the article at https://github.com/mattpocock/harness-claude-code-usage-repro, stored verbatim in the public cerebro-vault repository. Copyright remains with the original publisher (github.com).
@ai-sdk/harness-claude-code: last-step finish-step usage is the whole turn's cumulative total, not that step's own usage Minimal reproduction. npm install && npm run repro — no API key needed, it drives the package's own bridge event-processing code against a synthetic (but protocol-accurate) Claude Code CLI stream. On any turn with two or more model calls (i.e. any turn with at least one tool round trip before the final answer — subagents not required), the finish-step part emitted for the last step reports the whole turn's cumulative usage (every step summed) instead of that step's own usage
Backlinks
Appeared in 1 briefing