anomalyco / anomalyco/opencode
[FEATURE]:Token Usage & Cache Hit Dashboard per Session
@neriousy is already working on this.
Since Aug 13, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.