Before submitting
Area
apps/desktop (Usage dashboard)
Steps to reproduce
- Connect an OpenCode provider instance (OpenRouter key, models like openrouter/meta/muse-spark-1.3-contributor).
- Run real sessions through T3 Code via that provider.
- Open the Usage dashboard.
Expected behavior
Sessions show token usage and cost, same as Claude/Codex sessions.
Actual behavior
Usage shows nothing for OpenCode sessions. Spend reads $0 despite real usage.
Verified locally: the usage scanner only discovers discoverClaudeTranscripts and discoverCodexTranscripts. There is no OpenCode transcript path, and no reference to opencode.db in the bundle. Meanwhile ~/.local/share/opencode/opencode.db holds 6,727 step-finish records totaling ~76.7M input / 1.6M output tokens at ~$9.77 cost. The data exists, nothing reads it.
Related: #10919 (Antigravity usage missing), #5799 (unpriced activity renders as $0.00), #8388 (OpenCode via OpenRouter shows no composer usage meter). Same class: non-Claude/Codex usage invisible.
Impact
Major degradation or frequent failure (all OpenCode spend untracked)
Version or commit
0.0.40
Environment
Linux 6.8.0-124-generic x86_64; OpenCode CLI 1.18.29 via OpenCode provider with OpenRouter key
Logs or stack traces
# opencode.db step-finish totals
steps: 6727, input: 76729866, output: 1618314, cost: $9.7694
# T3 scan cache: 34 files tracked, all provider=claude, 0 opencode
Workaround
Query opencode.db directly:
python3 -c "
import sqlite3, json
db = sqlite3.connect('$HOME/.local/share/opencode/opencode.db')
cost = sum(json.loads(r[0]).get('cost', 0) for r in db.execute(\"select data from part where json_extract(data,'$.type')='step-finish'\"))
print('opencode spend: $%.4f' % cost)
"
Suggested fix
Add an OpenCode usage source: read per-step tokens/cost from opencode.db (part rows, type=step-finish), same as the Claude/Codex transcript parsers. Fall back to LiteLLM rates by model id when a step lacks cost.
Before submitting
Area
apps/desktop (Usage dashboard)
Steps to reproduce
Expected behavior
Sessions show token usage and cost, same as Claude/Codex sessions.
Actual behavior
Usage shows nothing for OpenCode sessions. Spend reads $0 despite real usage.
Verified locally: the usage scanner only discovers
discoverClaudeTranscriptsanddiscoverCodexTranscripts. There is no OpenCode transcript path, and no reference toopencode.dbin the bundle. Meanwhile~/.local/share/opencode/opencode.dbholds 6,727 step-finish records totaling ~76.7M input / 1.6M output tokens at ~$9.77 cost. The data exists, nothing reads it.Related: #10919 (Antigravity usage missing), #5799 (unpriced activity renders as $0.00), #8388 (OpenCode via OpenRouter shows no composer usage meter). Same class: non-Claude/Codex usage invisible.
Impact
Major degradation or frequent failure (all OpenCode spend untracked)
Version or commit
0.0.40
Environment
Linux 6.8.0-124-generic x86_64; OpenCode CLI 1.18.29 via OpenCode provider with OpenRouter key
Logs or stack traces
Workaround
Query opencode.db directly:
Suggested fix
Add an OpenCode usage source: read per-step tokens/cost from opencode.db (part rows, type=step-finish), same as the Claude/Codex transcript parsers. Fall back to LiteLLM rates by model id when a step lacks cost.