Provider
Copilot Chat (VS Code)
VS Code's Copilot Chat stores local session data that budi tails for token counts. For dollar-accurate reconciliation, add a GitHub PAT scoped to billing — budi matches local sessions against GitHub's per-(date, model) billing buckets.
Data sources
Local JSON/JSONL session data (primary)
VS Code stores Copilot Chat conversation data locally. Budi tails these files for output-only token counts, model names, and conversation metadata.
~/Library/Application Support/Code/User/workspaceStorage/ GitHub Billing API (supplementary)
When a GitHub PAT is configured, budi reconciles local session data against GitHub's per-(date, model) billing buckets for exact dollar amounts.
What's parsed
- Output token counts per message (input tokens not exposed by VS Code)
- Model name and version
- Dollar cost (from GitHub Billing API when PAT is configured, otherwise token-estimated)
- Session boundaries and conversation timestamps
- Workspace context for repo/branch attribution
GitHub PAT setup
Without a PAT, you get output-only token dollars — useful as a relative trend, but typically a fraction of the actual bill. With a PAT scoped to billing, budi reconciles to GitHub's exact dollar number per (date, model) bucket.
- Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens.
-
Create a token with the
billing:readscope. No other scopes are needed. - Pass it to budi:
budi config set github.pat ghp_your_token_here Org-managed licences
Caveats
- Without a PAT, cost is based on output-only tokens priced through budi's pricing manifest — useful as a trend line but not dollar-accurate.
- VS Code must be May-2026+ build for the local session files to include token metadata. Older builds lack the structured data budi needs.
- Copilot Chat in Cursor is tracked by the Cursor tailer (via SQLite), not the Copilot Chat tailer. See Cursor for details.
How to verify
After installing budi, open VS Code, use Copilot Chat, and then run:
budi doctor Look for the Copilot Chat tailer in the output:
✓ Daemon running (pid 12345, port 7878)
✓ Copilot Chat tailer: active
Path: ~/Library/Application Support/Code/User/workspaceStorage/
Last event: 6s ago
GitHub PAT: configured ✓
✓ All checks passed. If you haven't configured a PAT yet, the output will show:
✓ Copilot Chat tailer: active
GitHub PAT: not configured (output-only tokens)
Hint: budi config set github.pat <token>