Claude Code and Codex are logging your token usage locally. Here is how to read it.
A developer has discovered that AI coding assistants like Claude Code and Codex locally log detailed token usage data, including input tokens, cache hits, and output tokens. This information is available on the user's machine without requiring API calls or provider dashboards. The author explains how to access and interpret these logs, emphasizing the importance of the prompt cache hit rate as a key metric for efficiency. A tool called ModelMeter has been developed to collect this local log data and present it on a dashboard, providing insights into token consumption and cache performance. AI
IMPACT Developers can now monitor their AI coding assistant's token usage and cache hit rates locally, enabling better cost management and efficiency.