How much of what your coding agent spends is actually work: the share of paid tokens that became output, not context re-reading. Local, no network calls.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
git clone https://github.com/arsentev-ai/contextburnTools overview
<p align="center"> <img src="https://raw.githubusercontent.com/arsentev-ai/contextburn/main/assets/readme/hero.svg" width="100%" alt="contextburn: real output over 24 hours — useful work 0.18% of tokens, context re-reading 98.4%, cost-weighted useful work 6.7%, one useful token costs 555 paid tokens"> </p> <p align="center"><a href="https://doi.org/10.5281/zenodo.22712985"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.22712985.svg" alt="DOI 10.5281/zenodo.22712985"></a></p> **contextburn** reads the transcripts Claude Code already writes on your machine and tells you what share of the tokens you paid for became model output — and how much was the agent re-reading context it had already sent. Token counters answer *"how much did I spend?"*. This answers *"how much of it was work?"* — a normalised share, so it can be compared across sessions, models and ways of working. ## Try it ```bash cp bin/contextburn ~/bin/contextburn && chmod +x ~/bin/contextburn # python3 only, no dependencies contextburn detail 24 ``` ## Demo <p align="center"> <img src="https://raw.githubusercontent.com/arsentev-ai/contextburn/main/assets/readme/demo.gif" width="100%" alt="contextburn detail 72 over the 36 experiment runs: 168 sessions, useful work 1.44% of tokens, context re-reading 94.4%, cost-weighted 28.8%"> </p> Real output over the session logs of the 36 runs behind the U-curve report — nothing else on the machine. Video with DOI: [10.5281/zenodo.22713920](https://doi.org/10.5281/zenodo.22713920). The runs themselves are open: [Hugging Face](https://huggingface.co/datasets/arsentev-ai/context-ucurve-coding-agents) (DOI 10.57967/hf/10366) · [Kaggle](https://www.kaggle.com/datasets/arsentevai/context-u-curve-of-coding-agents-36-runs) · [OSF](https://osf.io/5qtwy/) (DOI 10.17605/OSF.IO/5QTWY). ## Why two numbers <p align="center"> <img src="https://raw.githubusercontent.com/arsentev-ai/contextburn/main/assets/readme/two-numbers.svg" width="100%" alt="Same 12 tasks, one long session versus twelve short, 3 runs each: token efficiency 1.11% vs 1.12%, no difference; cost-weighted efficiency 31.6% vs 24.6%, seven points apart"> </p> - **By tokens** the share barely moves. Every agent step resends the accumulated context, so re-reading dominates whatever you do — it describes the agent. - **Cost-weighted** the share does move, because cached reads are priced far below fresh input and output. It depends on how you run sessions — it describes you. The comparison above comes from a controlled experiment with its dataset and analysis scripts: [Clear Every Third Task: A Measured U-Curve in the Context Economy of Coding Agents](https://doi.org/10.5281/zenodo.22699668). ## How it counts - Reads local Claude Code transcripts (`~/.claude/projects/**/*.jsonl`). **Nothing leaves the machine — no network calls at all.** - Deduplicates usage records by message id and keeps the element-wise maximum. A streaming runtime writes an early snapshot and a final record for the same call: counting both double-counts it, keeping only the first halves the output. - Weights the cost share with per-model prices kept at the top of `bin/contextburn`. Update them there when they change. ## Commands | command | what it shows | |---|---| | `contextburn` | what is burning tokens right now | | `contextburn detail [hours]` | run efficiency, sessions, and what specifically inflated the context | | `contextburn window` | the current 5-hour subscription window | | `contextburn --json` | machine-readable state (used by the menu-bar app) | | `contextburn --probe <hours>` | raw JSON dump of the parsed sessions | | `contextburn --efficiency [hours]` | run efficiency as JSON | | `contextburn mcp` | start the MCP server | ### Configuration | setting | default | meaning | |---|---|---| | `CONTEXTBURN_LANG` or `~/.config/contextburn/lang` | `en` | interface language: `en` or `ru` | | `CONTEXTBURN_DAY_START` | `6` | hour your day starts — the daily total resets here | | `CONTEXTBURN_WARN` | `30000000` | tokens/hour that turns the menu-bar counter yellow | | `CONTEXTBURN_ALARM` | `90000000` | tokens/hour that turns it red | The language file exists because the menu-bar app is launched from Finder, where environment variables never reach it: `echo ru > ~/.config/contextburn/lang` switches both the app and the CLI. ## MCP server Let the agent read its own run efficiency mid-session. The package ships a dependency-free MCP server (stdio) with two tools: `run_efficiency` returns the shares as structured data, and `spend_breakdown` returns the full report. ```bash claude mcp add contextburn -- uvx contextburn mcp ``` Or install it as a Claude Code plugin, which registers the same server: ```text /plugin marketplace add arsentev-ai/contextburn /plugin install contextburn@contextburn ``` <!-- mcp-name: ai.arsentev/contextburn --> <!-- mcp-name: io.github.arsentev-ai/contextburn --> ## Editor extensions - **VS Code-compatible editors (VSCodium, Cursor, Windsurf, Gitpod…)** — [Open VSX: arsentev-ai.contextburn](https://open-vsx.org/extension/arsentev-ai/contextburn). A status bar meter over the local CLI; source in [`editors/vscode`](editors/vscode). - **Raycast** — source in [`editors/raycast`](editors/raycast), Store submission pending. ## Menu-bar app (macOS) `app/main.swift` is a small status-bar app. It polls `contextburn --json` once a minute and shows the current burn rate with an hourly graph; click a bar to see that hour's breakdown. ```bash swiftc -O -o ContextBurn app/main.swift ``` Set `CONTEXTBURN_BIN=/path/to/contextburn` if the CLI is not in `~/bin` or the usual Homebrew paths. ## Limits - Claude Code transcripts only, for now. - The cost-weighted share is only as current as the price table in `bin/contextburn`. ## Citing Software DOI (all versions): [10.5281/zenodo.22712985](https://doi.org/10.5281/zenodo.22712985). GitHub's **"Cite this repository"** button gives the reference; metadata is in [`CITATION.cff`](CITATION.cff). ## Author Evgenii Arsentev — [arsentev.ai](https://arsentev.ai) · ORCID [0000-0002-9120-7298](https://orcid.org/0000-0002-9120-7298) This project was published as `tokmon` on its first day and renamed to avoid confusion with unrelated tools of that name; `TOKMON_*` environment variables still work. ## License MIT — see [LICENSE](LICENSE).
What people ask about contextburn
What is arsentev-ai/contextburn?
+
arsentev-ai/contextburn is tools for the Claude AI ecosystem. How much of what your coding agent spends is actually work: the share of paid tokens that became output, not context re-reading. Local, no network calls. It has 0 GitHub stars and its last recorded update is dated 2026-09-11.
How do I install contextburn?
+
You can install contextburn by cloning the repository (https://github.com/arsentev-ai/contextburn) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is arsentev-ai/contextburn safe to use?
+
Our security agent has analyzed arsentev-ai/contextburn and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains arsentev-ai/contextburn?
+
arsentev-ai/contextburn is maintained by arsentev-ai. The last recorded GitHub activity is dated 2026-09-11, with 0 open issues.
Are there alternatives to contextburn?
+
Yes. On ClaudeWave you can browse similar tools at /categories/tools, sorted by popularity or recent activity.
Deploy contextburn to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/arsentev-ai-contextburn)<a href="https://claudewave.com/repo/arsentev-ai-contextburn"><img src="https://claudewave.com/api/badge/arsentev-ai-contextburn" alt="Featured on ClaudeWave: arsentev-ai/contextburn" width="320" height="64" /></a>More Tools
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Use Claude Code, Codex, Pi, and OpenCode and more for free (1.3B+ free tokens) from your terminal, app, IDE, or phone like OpenClaw (voice supported + ToS friendly)