A Python repository named claude-code-usage-analysis offers an empirical look at how Claude Code consumes tokens in practice. It examines token usage across eight developer workflows, focusing on when auto-compaction of the context window kicks in and where an effective 'sweet spot' for it appears to lie.
It also compares token overhead between Claude Desktop and the Claude Code CLI, and takes prompt caching into account. For developers running long coding sessions, the results can inform decisions about when to start new sessions or trigger compaction, potentially reducing token spend.
Summary by angular.love. The original source has the full details.