Token Doctor
Diagnoses Claude Code and Codex token spend by analyzing local transcripts to detect cost drivers, cache rebuilds, and marathon sessions.
Token Doctor provides a comprehensive, two-stage diagnostic of your Claude Code, Cowork, and Codex token consumption and API costs. By parsing local session logs without sending sensitive transcript bodies externally, it generates an immediate terminal report breaking down conversation lengths, cache rebuild expenses, zombie sessions, and project-by-project health. Users can optionally trigger a deeper analysis using parallel Haiku subagents to dissect high-cost session hotspots and receive actionable, structured recommendations to optimize AI-assisted coding habits.
Key Features
01Rapid local transcript analysis across Claude Code, Cowork, and Codex workflows
02Vital sign tracking for marathon sessions, zombie runs, cache rebuilds, and context re-read ratios
03Terminal-based visual breakdown of conversation length distributions and per-project spend
04Opt-in deep-dive analysis fanning out parallel Haiku subagents over session hotspots
05Actionable treatment plans outlining positive patterns to keep and high-impact habit changes
0697 GitHub stars
Use Cases
01Auditing Claude Code and Codex logs to diagnose why monthly API spending is higher than expected
02Detecting context bloat, cache rebuild bottlenecks, and runaway multi-hour marathon sessions
03Benchmarking team and personal development habits to establish cost-effective AI workflows