Claude Code Now Compacts at ~400K on 1M Models. I Was Annoyed, Then I Wasn't
Claude Code 2.1.334 moves auto-compaction on most 1M-context models from ~967K tokens down to ~367K-400K. Here's what changed, why, and how to check it or switch it back. I'll be honest. My first reaction was a little b
Claude Code 2.1.334 moves auto-compaction on most 1M-context models from ~967K tokens down to ~367K-400K. Here's what changed, why, and how to check it or switch it back.
I'll be honest. My first reaction was a little bit of betrayal.
I'd gotten used to the 1M context window. I treated it like a giant, bottomless desk. Throw the logs on it. Throw the whole service folder on it. Paste the stack trace, the migration, the three failed attempts from earlier in the day. Plenty of room.
Then Claude Code 2.1.334 landed on December 1, 2026, and my sessions started compacting way earlier than I expected.
My gut said: "Wait. Did they just take away my context?"
They didn't. But it took me a coffee and a few long sessions to see why this change is actually kind of good.
What actually changed
Here is the whole change in one sentence:
Starting with Claude Code 2.1.334, auto-compaction on most 1M-context models now triggers around 367K to 400K tokens, instead of near the full 1M (about 967K tokens).
That's it. The 1M window is still there. The model can still hold that much. What moved is the point where Claude Code decides, "okay, this conversation is getting heavy, let me summarize the older parts and keep going."
Before: the session filled up to ~967K, then compacted.
Now: the session compacts at roughly 367K to 400K by default.
Why would anyone want less?
This is where my annoyance started to fade.
The stated goal is to keep long sessions:
- Faster. Every turn re-reads the whole context. A 900K-token conversation is a heavy thing to drag around on every single reply.
- Cheaper on tokens. Same reason. More context per turn means more tokens burned per turn, even when 80% of it is stale.
- More accurate as context grows. This one hit home for me.
Think about the last time you had a truly enormous session. Did the answers get better near the end? Mine didn't. They got slower, and sometimes the model held onto a detail from four hours ago that I had already thrown away. The old plan. The wrong file. The bug we already fixed.
A huge context isn't the same as a clean context. Compacting earlier keeps the working memory tidier. Less noise, more signal.
Honestly? I'd been doing a manual version of this for months by starting fresh sessions when things felt "foggy." Now the tool does it for me.
Okay, but how do I see what's going on?
You don't have to guess. There are a few simple ways to check.
1. Check your current threshold
Run /autocompact with no arguments:
> /autocompact
It shows you the threshold that's active for your current model.
One small gotcha: if you resumed a session, run it after Claude's first reply. Before that, it may not have the full picture yet.
2. See what's eating your context
> /context
This breaks down what's using space in the window. It's the command I wish I'd run earlier. The first time I did, I found out a huge chunk of my context was one giant log file I'd pasted and completely forgotten about. Oops.
"I want my 1M back." Fair enough.
Some work really does need the giant desk. If that's you, there are three ways to get it back.
Option A: Save 1M for this model version
> /autocompact 1M
This saves the 1M window as your setting for that model version. It sticks across future sessions with that model.
Option B: Use 1M for just one launch
Maybe you only need the big window today, for one gnarly task:
claude --autocompact 1M
This applies to that single launch only. Next time you run plain claude, you're back to the default.
Option C: Use the settings menu
> /config
In /config you can adjust the Auto-compact window, or toggle auto-compact on or off entirely.
Changed your mind? Go back to the default
> /autocompact auto
This returns you to the tuned default. No harm done.
Real scenarios: when to use what
Here's how I've started thinking about it.
Scenario 1: The everyday feature work (stay on the default)
You're adding an endpoint, writing tests, fixing a couple of lint errors. The session goes on for a couple of hours.
claude
> Add a /health endpoint to the API and write tests for it
...
> Now fix the failing test in user.service.spec.ts
...
> Run the linter and fix what it finds
You'll probably cross ~400K at some point, compaction kicks in, the old back-and-forth gets summarized, and you keep going. Faster replies, fewer wasted tokens. This is exactly what the default is built for.
Scenario 2: The giant cross-file refactor (consider 1M for that launch)
You're renaming a core concept across a big codebase, and you really need Claude to keep dozens of files and the full migration plan in view at the same time. Losing detail to a summary halfway through would hurt.
claude --autocompact 1M
You get the big window for this one session. Tomorrow, plain claude gives you the default again. I like this one a lot because it's a deliberate choice, not a permanent habit.
Scenario 3: "Why is everything so slow?" (check before you change)
You're 3 hours into a debugging session. Replies feel sluggish. Before you touch any setting:
> /context
If you see one massive pasted file, a pile of old tool output, or an exploration you've already finished, that's your answer. Maybe the right move isn't a bigger window. Maybe it's a cleaner one.
Scenario 4: You always work on huge monorepos (save it)
If your daily reality is massive context, every day, on one model:
> /autocompact 1M
Saved for that model version. You stop fighting the default.
And if a few weeks later you notice your token usage has gone through the roof:
> /autocompact auto
Back to the tuned default.
A quick cheat sheet
| What you want | What to run |
|---|---|
| See your current threshold |
/autocompact (after Claude's first reply in resumed sessions) |
| See what's using context | /context |
| Use 1M for this model version | /autocompact 1M |
| Use 1M for just one launch | claude --autocompact 1M |
| Tweak the window or turn auto-compact on/off | /config |
| Go back to the default | /autocompact auto |
Where I landed
I started this week thinking something had been taken from me. I'm ending it with faster sessions, a smaller token bill, and fewer moments where the model clings to some ancient detail I'd already moved past.
The 1M window didn't go anywhere. It just stopped being the default for every single conversation. When I really need it, it's one flag away.
And that feels right. Big context is a power tool. You don't need a power tool to hang a picture frame.
So, run /context on your next long session. You might be surprised at what's sitting in there.
Have you noticed the change yet? Did it speed things up for you, or are you running --autocompact 1M all day? Tell me in the comments. I'm genuinely curious.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.