Context Tax banner
fomoles fomoles

Context Tax

AI community

Description

Most of what you pay an AI coding agent is not thinking - it is re-reading. Measure your own context tax, cap it, and prove the cap fired. One Python file, no dependencies.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

context-tax

[![tests](https://github.com/fomoles/context-tax/actions/workflows/ci.yml/badge.svg)](https://github.com/fomoles/context-tax/actions/workflows/ci.yml)  *English · [українська](README.uk.md)*

**Most of what you pay an AI coding agent is not thinking. It is re-reading.**

Across 6,069 real steps on one machine, **63.5% of the bill** was the model reading back context it already had. Output — the actual thinking and answers — was 18.6%.

That share is not a constant. It grows with the session, because the price of a step is a straight line in how much context the step carries. So a long session gets more expensive per step, forever, until it dies. One line in a settings file stops that.

`ctxtax` is a single Python file, no dependencies, that reads your own local Claude Code transcripts and tells you what your context is costing you — then sets the ceiling that caps it, and proves the ceiling actually fired.

Context carried per step, in two real sessions: one uncapped climbing to 497k over 274 steps with zero compactions, one capped sawtoothing seven times and never passing 167k

Try it in 30 seconds

Nothing is installed, nothing is sent anywhere, nothing is modified.

curl -O https://raw.githubusercontent.com/fomoles/context-tax/main/ctxtax.py
python ctxtax.py measure --days 7

You get eight sections of your own numbers: what you spent, how the price of a step grew with session depth, the fitted price law, where the money went, what compaction costs you in wall-clock time, whether it damaged the work, and what a different ceiling would cost.

Then, if the numbers say what they said here:

python ctxtax.py cap        # writes one key, backs up settings.json first
# start a NEW session, work for a while
python ctxtax.py verify     # green only when compa