Skip to content

[FEATURE]:Token Usage & Cache Hit Dashboard per Session #42295

Description

@GuixJoy

Describe the enhancement you want to request

Add a live token usage and cache analytics panel visible during an active OpenCode session. This would display:

  • Total tokens consumed in the current session (input + output separately)
  • Cache hit count and cache hit ratio as a percentage
  • Estimated cost for the current session based on the model being used
  • A per-message breakdown showing tokens used per exchange

Right now there is no visibility into how much context is being consumed during a session. This creates two problems. First, developers have no idea when they are approaching context limits until the model starts degrading in quality. Second, there is no way to evaluate whether caching is actually working effectively across a session.

A token usage panel solves both. It helps developers make informed decisions about when to start a new session, which parts of their workflow are token-heavy, and whether their cache configuration is performing as expected.

This is especially useful for long agentic sessions where token consumption compounds quickly and cost visibility matters.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions