#22 · Primary category: AI Usage & Cost Monitoring

cost-xray

claude-code codex-cli cost-tracking observability prompt-caching proxy token-counting

See what Claude Code and Codex actually send to the API — and what each part costs.

Project last updated:07/27/26

GitHub Stars

611

Forks

78

Contributors

1

License

MIT

Why we included this project

If you run Claude Code or Codex and the monthly bill keeps surprising you, this tool answers a question most usage trackers can't: not just how much a turn cost, but which part of the request drove it. Instead of reading local transcripts after the fact, it captures the actual API traffic through a transparent local proxy and attributes tokens and dollars back to their sources, including system prompts, tool schemas, MCP servers, cache reads and writes, and previous thinking blocks. That request-time context is assembled before the model runs and never shows up in the logs, yet it can account for roughly half the context window. The TUI lets you drill from an agent down to a single tool call, see context-window occupancy, and spot unused MCP servers that quietly add schema overhead on every turn, and it runs locally with no API keys, no account, and no changes to your agent's behavior. Teams tuning prompts, pruning MCP configs, or justifying spend will find the per-source breakdown useful.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category