Feature request: historical cost/usage tracking across sessions
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 14 comments · opened Jul 16, 2026
Feature Request
Add the ability to view historical cost and token usage across sessions — not just the current session.
Problem
The /cost command only shows usage for the current session. There's no way to see weekly or monthly spending, which makes it hard to track and budget Claude Code usage over time.
Proposed Solution
Options (any or all would be valuable):
/cost --week//cost --month— aggregate cost data across sessions for the last 7 or 30 days/cost --history— show a table of per-session costs with dates- Persistent local log — automatically log session cost summaries to a local file (e.g.
~/.claude/usage-history.json) so users can query or export their own data - Session-end hook data — expose cost/token data as environment variables in a
StoporSessionEndhook, so users can log it themselves
Why This Matters
- Budget tracking for teams and individuals
- Identifying which projects or tasks are most expensive
- Comparing usage patterns over time
- Required for any kind of chargeback or cost allocation
Currently the only workaround is manually noting /cost output before ending each session.
---
🤖 Generated with Claude Code
This issue has 14 comments on GitHub. Read the full discussion on GitHub ↗