One Number in My Status Line, and I Can't Stop Running /compact
I'll start with what happened, because it's a little funny.
In early September I added one thing to Claude Code's status line: how much context this session is using. It's one small line of text:
◔ 312k/1M 31% ⚠200k+
And then I started running /compact constantly.
Nobody told me to, and I hadn't read some best-practices guide. The number just sat at the bottom of the screen and went up a little with every Enter, and past a certain point I couldn't leave it alone.
The funnier part: my usage quota started lasting. I used to feel nervous once I was halfway through the week. Now the weekend comes and there's still a good chunk left.
I went through the session logs on my machine to see whether this was real or just a feeling.
1. The numbers
I used the day I added the readout as the dividing line and compared the twenty days on each side:
| 20 days before | 20 days after | |
|---|---|---|
Manual /compact |
2 | 35 |
| Auto-compaction | 3 | 1 |
| Context per request (mean) | ~254k | ~202k |
| Context per request (median) | ~203k | ~170k |
| Share of requests over 200k | ~51% | ~40% |
Manual compaction went up more than tenfold, and auto-compaction mostly stopped happening. The context carried on each turn got about 20% lighter on average.
Both numbers come down to one change: I used to wait passively for the window to fill. Now I clear it before it gets heavy.
I can't say exactly how much quota this saved. How a subscription quota maps to tokens isn't visible from the outside. But "every turn carries 20% less" is real, and it was the same model doing the same kind of work.
2. Why one number changed a habit
LLM conversations have a counterintuitive property: every turn re-sends everything that came before it.
When you ask your 50th question, the previous 49 turns go along with it, plus every file the model read and every command output. Prompt caching makes the re-sent part much cheaper, but it isn't free.
So the longer a session runs, the more each new message costs. It's like a car where things go into the trunk and never come out. Fuel use climbs every day, and the dashboard has no gauge for load.
I knew this in theory before, but I didn't feel it. The theory was "long sessions cost more." The feeling is "this message is carrying 312k tokens."
Knowing the theory didn't change what I did. Feeling it did.
Budgeting works the same way. Knowing you spend a lot on takeout does nothing. Seeing the actual number on the statement is what makes you hesitate.
3. How the readout is designed
The status line is a script. On every refresh, Claude Code pipes a blob of JSON about the current session into it, and the script prints one line of text. I made a few small decisions for the context readout, and each one turned out to matter:
Show "used," not "remaining." Compaction triggers on what's used, so watching usage tells you how far you are from the next interruption. "69% left" sounds reassuring. "312k used" makes you want to do something.
Use color. Below 70% it's dim grey. At 70% it turns yellow, and at 85% it turns bold red. While it's grey it barely registers. Once it changes color, I know to stop and think without reading the number.
Add a separate "⚠200k+" flag. I use the 1M window, so at 300k the percentage only reads 31%, which doesn't look alarming. But past 200k tokens the price per token moves to a higher tier. So this flag means "this got more expensive," not "this is almost full." With a big window those are very different things, and I want to be told about each one.
The ⚠ is what actually got me compacting by hand. When it lights up, I ask myself whether I'll need anything earlier in this session again.
Most of the time I won't.
4. When to run /compact
After twenty days, a few moments stand out:
- Between two pieces of work. You've just fixed a bug and committed it, and the next task is related but separate. The debugging trail is no longer useful, and the conclusion is in the commit.
- After reading a pile of files to find where a problem is. The search takes a lot of room. Once you've found it, you only need to remember where it is and why.
- When ⚠200k+ lights up. It's the most direct signal.
- Don't wait for auto-compaction. It tends to hit at the worst possible moment, halfway through a long task. When you compact by hand you pick the moment, and you can tell it what to keep.
There are also times not to compact: when you're chasing a bug with lots of detail and every line of error output in the context is still useful. Compacting then throws away your clues.
5. Something I noticed along the way
After this readout, I added a few more things to the status line: session cost, whether the prompt cache is warm or cold, and whether my subscription quota is past halfway (hidden below 50%, so it doesn't turn into noise).
Looking back, though, the context readout is the only one that changed how I work. The others are nice to know. The context number changes on every turn, and I can do something about it.
I think that's what decides whether a number can change a habit:
A number earns a place in front of you if it moves when you act, and you have a way to move it back.
I can't undo money I've already spent. Quota usage only goes down when it resets. Context is the one number I can knock back down with a single /compact.
Finally
There's nothing technical about this. It's one line of text.
It reminded me of something I wrote recently: anxiety comes from not knowing the numbers. The reverse holds too: waste comes from not knowing the numbers.
It's not that I didn't want to save before. I couldn't see where the waste was.
Now I can see it, and I change what I do without thinking about it. Ha.
