A CLI tool now ranks multi-agent runs by cost and flags repeated context tokens
rrk059 · reddit · 2026-07-29
A developer built token-trace-viewer, a CLI for parsing OpenInference JSONL logs from multi-sub-agent runs and ranking sub-agents by cost.
They say existing tools can show costs, but not in the specific way they needed:
- LangSmith and Langfuse expose costs mostly inside dashboards across many runs
- Helicone can do it, but only if every run is tagged and queried manually
- Phoenix offers per-span or per-project costs, with no middle ground
- OpenInference carries the needed fields, but it's only a spec
The script also tries to surface repeated context blocks, such as system prompts resent at every step, so teams can see wasted tokens. Current limitations include prefix-only matching, estimated token counting, two hardcoded costs, and testing on one real LangGraph run.
More from coding & agent
- Peter Yang shows a six-step Claude Design and Claude Code workflow for shipping apps — petergyang · 2026-07-29
- Beyond Writing Code: The Gap to AI Shipping Software — aahiknsv · 2026-07-29
- Why AI writing code is not the same as AI shipping software — aahiknsv · 2026-07-29
- Verdent Partners with Moonshot to Optimize Agentic Coding for 2.8T-param Kimi K3 — PrajwalTomar_ · 2026-07-29
- A 3D pose editor turns skeletons into depth maps for Krea 2 and Z-Image — ashishsanu · 2026-07-29
- Engineer Tests Claude for CAD: Turns Messy PPT Specs into DXF Files — burhop · 2026-07-29