A new open-source tool called Wattage scans Claude Code session traces and flags where tokens are being wasted, giving prompt engineers and engineering teams a concrete way to cut costs and tighten context usage in agentic coding workflows.
Why it matters
Claude Code sessions are notoriously context-heavy. Every tool call, file read, and multi-step reasoning chain burns tokens, and most teams have no visibility into which parts of a session are pulling their weight versus padding the bill. Wattage fills that gap by analyzing session traces and surfacing waste patterns, a capability that has been conspicuously absent from the Claude Code ecosystem until now.
Token costs in agentic workflows are not linear. A single poorly scoped context window, repeated on hundreds of developer sessions, becomes a significant line item. The problem is not just cost: bloated context degrades model attention and increases the chance of the model losing track of earlier instructions.
The tokens you waste are not neutral, they are actively competing with the tokens you need.
What changes in practice
- Teams can move from reactive cost monitoring (checking invoices) to proactive session design informed by actual waste data.
- Prompt engineers get a feedback loop on system prompt efficiency, not just output quality.
- Engineering leads can benchmark token consumption across developers or feature branches, not just across models.
- Identifying redundant file reads or repeated tool calls becomes a data-driven exercise rather than code review intuition.
How to use it
- Point Wattage at your Claude Code session logs to generate a waste report. The Show HN post has setup details.
- Sort findings by token volume, not just frequency. A pattern that fires rarely but dumps thousands of tokens each time is your highest-leverage fix.
- Use the output to audit your system prompt. Sections that are never referenced in tool calls or model outputs are candidates for removal or compression.
- Re-run after changes to confirm the delta. Treat it like a performance profiler: measure, change, measure again.
- Integrate into CI if you are shipping a Claude Code-based product. Catching context bloat before it reaches production is cheaper than fixing it after.
For teams already thinking about token optimization across their LLM stack, Wattage is a practical starting point for the agentic coding layer specifically.
Token waste is a solvable engineering problem, and now there is a tool that makes solving it measurable.
READY TO ASCEND
Get AI news that respects your time
The signal, distilled. Curated AI news and prompt-engineering insight. No noise.