You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install and authenticate OpenCode (opencode auth login) and run a few sessions so ~/.local/share/opencode/opencode.db has assistant messages with token usage.
Start T3 Code from latest main (b2e2ccfd) and open the Usage page.
Select any window (Past 24h, 7 days, 30 days). Note totals and provider breakdown.
Expected behavior
Usage should include OpenCode alongside Claude Code and Codex. The page already reads provider CLIs own history so sessions started outside T3 Code still count. That is what ccusage does for Claude and Codex, and OpenCode should work the same way.
Actual behavior
Only claude and codex appear. UsageProviderKind is still ["claude", "codex"] and USAGE_CONTRACT_VERSION is 4 on main. OpenCode sends turn usage to the context meter, but the Usage page never scans opencode.db. The result is empty or understated totals for anyone who works through OpenCode, and no way to see that provider in charts, tables, or coverage reporting.
Related: closed #5706 described this gap for Grok and OpenCode. Three open PRs (#6040, #6014, #7221) propose the same provider, but none have landed on main.
Impact
Minor bug but frequent. Anyone using OpenCode alongside Claude or Codex sees incomplete cost and token numbers and cannot compare providers.
Raspberry Pi OS, Node 26.5.0, OpenCode 1.0+, T3 Code web app via npx t3
Logs or stack traces
No error. UsageService only resolves ~/.claude/projects and ~/.codex/sessions. No source is reported for opencode, so the contract never emits that provider.
Workaround
Run opencode stats separately. That shows the same SQLite totals.
Contribution
I can help implement the scan. OpenCode stores usage in SQLite, not JSONL, so the server needs a read-only query against the message table rather than a file walk. Contract needs opencode added and version bumped to 5, and web and mobile need the label, color, and icon in PROVIDER_PRESENTATION.
Thanks for the detailed report. We are tracking OpenCode history on the Usage page in Ideas discussion #6909.
The current Usage page was built around Claude and Codex history. Reading OpenCode's SQLite history, expanding the usage contract, and adding provider presentation are new provider support. I added the database, contract-version, and presentation details from this report to the discussion before closing the issue. The live OpenCode context-meter bug in issue #8388 and the Grok context-meter bug in issue #8382 remain separate and open.
I'm closing this as a feature request tracked in Ideas as part of an automated pass on all open issues. This does not mean OpenCode Usage support is implemented. The linked discussion now holds this report's Usage-page requirements.
Activity
SpyC0der77 commentedon Aug 23, 2026
Yes, PLEASE IMPLEMENT THIS
feat(usage): add OpenCode to usage contract and provider presentation
t3dotgg commentedon Aug 28, 2026
Note
🤖 GPT-5.6 Sol responding on behalf of Theo
Thanks for the detailed report. We are tracking OpenCode history on the Usage page in Ideas discussion #6909.
The current Usage page was built around Claude and Codex history. Reading OpenCode's SQLite history, expanding the usage contract, and adding provider presentation are new provider support. I added the database, contract-version, and presentation details from this report to the discussion before closing the issue. The live OpenCode context-meter bug in issue #8388 and the Grok context-meter bug in issue #8382 remain separate and open.
I'm closing this as a feature request tracked in Ideas as part of an automated pass on all open issues. This does not mean OpenCode Usage support is implemented. The linked discussion now holds this report's Usage-page requirements.