t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Usage tab: add OpenCode and Mistral Vibe as session sources

Open albert2704 opened this issue 2 weeks ago • 2 comments

Problem

The Usage tab only counts spend for CLIs whose session logs the usage scanner ingests. On my machine the scanner's source list is only:

  • claude — ~/.claude/projects
  • codex — ~/.codex/sessions
  • grok — ~/.grok/sessions
  • pi — ~/.pi/agent/sessions

OpenCode and Mistral Vibe sessions exist on disk but are never scanned, so they show nothing on the Usage tab:

  • OpenCode stores sessions in ~/.local/share/opencode (sqlite db opencode.db + storage/, per-machine)
  • Mistral Vibe stores sessions in ~/.vibe/logs/session/ (per-session journal/*.jsonl files with a cumulative tokenUsage object: inputTokens, outputTokens, cachedInputTokens, totalTokens)

Net effect: real usage I'm paying for is invisible in the usage breakdown, which under-reports and makes the claude/gpt shares look inflated.

Request

Add these two as usage scan sources, like the existing four. Both write token totals locally, so this is a read-only parser addition — no login or provider API needed:

  1. OpenCode: read per-message token stats from opencode.db (or storage/message/*.json in older versions).
  2. Mistral Vibe: read tokenUsage from ~/.vibe/logs/session/*/(journal/.jsonl|generations//checkpoint.json)`; deltas between successive cumulative states give per-turn input/output/cached.

Grok and Pi are already wired but showed nothing until I had sessions from them — same pattern is worth handling generically so the tab lists any source with session data on disk.

albert2704 avatar Nov 14 '26 16:11 albert2704

Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

juliusmarminge avatar Nov 14 '26 16:11 juliusmarminge

Moved to Discussions as suggested: https://github.com/pingdotgg/t3code/discussions/36827

albert2704 avatar Nov 14 '26 16:11 albert2704