Claude Code usage tracking by LangWatch - See what your Claude Code sessions actually cost

by•
Track Claude Code usage: cost, cache, session replay. Run `npx langwatch claude` once. Every session gets cost with cache reads/writes as separate token classes, every bash and MCP call as a span, theoretical vs billed for your Max plan, and a full terminal replay in the UI. Works for Codex too.

Add a comment

Replies

Best

Most observability tools focus on applications. This one focuses on the developers building them. Good to have LangWatch back on PH.

 Thanks! It has been some time since our latest launch and indeed, this was just so much value to our own team that we had to launch it here again to other developers!

Its a much broader trend we see moving from building custom agents/apps towards anyone building with claude, co-pilot, codex solutions, so broader view / visibilty is required to keep control! More to come!

I'm bookmarking this. Comparing theoretical cost against what I'm actually billed on Max is something I've wanted for a while.

 go try it once you've found some time to track it, it will only take. you acouple of minutes!

does the terminal replay work for headless/CI runs with no TTY, or does capturing the replay need an actual interactive session? we run a chunk of our agent work in CI and cost visibility there is usually the blind spot

 for sure! we don't actually capture the TTY so it doesn't play a role, we just capture the telemetry behind and fully reconstruct on the frontend to look like a terminal, it's not a capture from the real terminal, so that's an actual great use case for it!

The terminal replay is a nice touch. Being able to see what happened makes this much more useful. Nice work!

 absolutely and it allows you to improve your prompt skills as well! Let us know once you've tried, happy to help out!

I really enjoy seeing having a completing picture of all subagents per skill. then associated by model? and even having the granular cost? ok that was nice.

 love it that you already tried it! Let's go!

Congrats! One feature I'd enjoy is benchmarking cost efficiency across different coding models for the same task. Is that possible?

 yes, absolutely! This can be done with our experimentation and agent simulations features.

Using our API or MCP, you can grab real cases from tasks you ran through your coding usage and make them as test cases to rerun on different models. Then you can clearly see which ones managed to achieve the goal most successfully, and what was the time and cost to do so

 Absolutely- you can build you own analytics view for that: sessions running in parallel, cost per session, model, etc! Good luck, and let us know!

I can imagine engineering managers using this to better understand AI adoption across teams. Good launch!!

 yes so this part of the launch is pure visibility for dev's but we do give Admin dashboards and insights as well for engineering leaders managing budgets, for prediction and optimizing spend accross

The replay functionality could be just as useful for learning as it is for troubleshooting. :)

 indeed and to improve your skills for example! Let us know your feedback once you tried, very curious!

 the cool thing is that you can even point the agent back at it to troubleshoot itself and improve their skills for next time

Looking forward to seeing historical trends showing how coding workflows evolve over months. :D

 exactly! We all have a feeling that the token expending per PR has been increasing, the cost per token too, sometimes "cheaper" models but actually spending double the tokens and so on.

It will be great to actually measure that effect for your team and having all the data behind it to read back and optimize

This solves a problem many developers don't realize they have until the AI bill shows up. And if they have setup the credit card that's a red zone LOL

 true - and right now it might be a nice to have, but the moment control is more needed withing organisations this will be a must have for any org!