Skip to content

Token Economy HUD: cached tokens counter accumulates across requests #424

@bonk-moltbot

Description

@bonk-moltbot

What

The cached tokens counter in the Token Economy HUD shows 1M+ tokens, which is physically impossible in a single context window.

Expected behavior

Show per-request cache statistics — how many tokens were cache hits vs cache misses in the current (or most recent) API request.

Actual behavior

Counter appears to sum cache_read_input_tokens cumulatively across all API requests in the session, producing impossibly large numbers.

Related

References

Full exploration: thoughts/shared/notes/2026-04-03/qa-brainstorm-event-loop-mailbox.md (Bug 2: Cached tokens counter shows 1M+)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions