copilot-session-usageΒΆ
copilot-session-usage reads VS Code Copilot debug logs and tells you how much each AI coding session cost in USD.
VS Code does not show session costs in its UI. The debug logs contain token counts per model. This tool reads those logs, applies the real published pricing (with cache discounts and long-context tiers), and prints a cost report in seconds.
The most common use: after a heavy agentic session, run
copilot-session-usage latest to see what it cost.
Links to source code: gsemet/copilot-session-usage
Install copilot-session-usage with uv or pip.
Analyze your first session and understand the output in under 5 minutes.
Export to JSON, track spending over time, integrate in scripts, and configure WSL2.
Complete CLI and Python API documentation.
Where the logs live, how tokens are counted, and how pricing tiers are applied.