Binarii Cost: Connect GitHub — Authenticate with GitHub
Binarii Cost: Refresh Claude — Refresh Claude usage and sync with API
How it works
Copilot
Queries GitHub's internal Copilot API to fetch your quota usage directly.
Claude — Hybrid tracking
Claude usage tracking combines two data sources to stay accurate without excessive API calls:
API sync — At startup, the extension calls the Claude API to get your exact usage percentage (e.g. 42%) and the session reset time. This is the "baseline".
Local inference — Between API syncs, the extension reads Claude Code's local session files (~/.claude/projects/) every 120s to count new tokens. It converts this token delta into an estimated percentage increase based on the baseline ratio.
Threshold re-sync — When the estimated usage crosses a threshold (every 10% by default), the extension calls the API again to correct any drift and establish a new baseline.
This means: if the API says you're at 42% and you've used 15% more tokens locally, the status bar shows ~57%. When you cross 50%, it re-syncs with the API to get the real number.
Setting
What it controls
claudeCost.refreshInterval
How often local token files are re-read (default: 120s)
claudeCost.apiSyncThreshold
How often the API is called to correct the estimate (default: every 10%)