Files
oh-my-pi/packages/coding-agent/src/modes/components
Miroslav Drbal 084488b680 fix(coding-agent): exclude cacheRead from token display, add per-subagent cost
Token counter (token_total status-line segment, subagent progress tree,
session-observer stats line) previously included cacheRead in its cumulative
sum. With Anthropic prompt caching, cacheRead per turn equals the full cached
context, so summing across N turns gives N*context_size -- a session with a 1M
context and 5 turns showed ~5M tokens despite no compaction occurring.

Fix: display shows input + output + cacheWrite per turn. cacheWrite is kept
because each byte is written once; cacheRead re-reads the same context every
turn. Dedicated cache_read/cache_write status-line segments still show cache
activity; billing cost is unaffected.

Also adds per-subagent cost display (dollar amount, statusLineCost color)
accumulated incrementally from message_end events. Hidden when cost is zero
(subscription/OAuth providers). Brings token and cost display in line with
what Claude Code shows per-agent.
2026-05-13 19:26:38 +02:00
..
2026-05-13 13:21:59 +02:00
2026-02-10 07:39:39 +01:00
2026-02-10 07:39:39 +01:00
2026-02-10 07:39:39 +01:00
2026-02-10 07:39:39 +01:00
2026-04-26 06:59:47 +02:00
2026-02-10 07:39:39 +01:00
2026-02-10 07:39:39 +01:00
2026-05-13 13:21:59 +02:00
2026-02-10 07:39:39 +01:00