r/ClaudeCode • u/omerkaptan • 13h ago
Help/Question Why keep a 1M context window if Claude Code now defaults to auto-compacting at 400k?
Saw Lydia Hallie's post that Claude Code is rolling out 400k auto-compact as the default for most 1M models, to help with usage on long sessions. You can still get the full 1M with /autocompact 1m or in config.
I'm a bit confused by the design choice, though. If the default is to compact at 400k because resending a huge history with every message gets expensive even with caching, what's the 1M window for?
Why not just cap context at 400k? When is it actually worth running the full 1M instead of compacting earlier?
Curious how others are thinking about the tradeoff.
•
u/AutoModerator 13h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
501
u/PestiferousGamer 12h ago •
Plot twist, the other 600k context is used up by anthropic telling claude what its not allowed to do.
112
u/friedmud 12h ago
People do more with these models than just code. Our agents are processing multi-thousand page documents, thousands of government regulations, thousands of engineering design drawings, etc. They often use ALL of the context (and more via dynamic compaction we have in our harness).
92
u/Vysion34 Senior Developer 11h ago
Context rot. LLMs get worse as the context window fills up. A 1 million context window raises the ceiling so that the lower end (<50%) has more room. Auto-compacting at 400k keeps the general inexperienced user at a healthy context window size.
26
u/Unhappy-Loss-97 10h ago
A 1M window is great as a short, disposable read-only pass (dumping a giant log or big diff in once to diagnose something), terrible as a place to live all day.
Even at 97%+ prompt-cache hit rates, sitting at 250k–600k context across hundreds of tool calls crushes both weekly limits and turn speed—especially the moment a >5 min pause evicts the KV cache and forces a full re-prefill. Worse, a giant window creates a false sense of safety: it quietly encourages you to treat context like a filing cabinet instead of working memory, which batters your token usage long before you realise what happened.
I stopped relying on auto-compact and switched to retiring threads around ~100k–150k with a 15-line handover note (paths, commit SHA, next step, and crucially the dead ends / approaches already ruled out).
44
u/Savings-Cry-3201 12h ago
“To help with usage”
The only people it helps are Claude’s shareholders. Compute goes up quadratically with context length so cutting context from a more reasonable 700k down to an average of 400k saves a metric s ton of storage and compute.
They are doing this because their attention isn’t as good (cheap and efficient) as DeepSeek’s and they get the double benefit of being able to charge for I assume both an API compaction call and input tokens for the new context.
And to be fair, if they can now run 500k models going forward by default that’s a lot cheaper to train and you can fit twice as many instances on your servers.
This is 100% them trying everything they can to wring every drop of efficiency out of their business so they can finally show a profit.
I can’t blame them, to be fair, it’s not the worst business decision, but let’s not pretend it’s anything but a way of trying to cut compute wherever possible.
6
u/snow_schwartz 12h ago
Funny - this has been my default since 1m window models were released.
3
u/rlorenzo 11h ago
First, ask your Claude if any of your past sessions ran more than 400k tokens. I just had 1 session out of hundreds. It's most likely no big deal.
7
u/Somtimesitbelikethat 12h ago
there’s a difference between what it can do versus what it should do for the majority of users. A Ferrari can go 230 mph and pur like a kitten, but the majority of people just need to get to work and back
7
u/orbital_trace 12h ago
I don't think there is any good reason to go to 1M tokens at this point. https://coralhub.dev/blog/context-reset-turn-cost.html based on my analysis around 225K is the sweet spot. Dropped costs by 50-75%
4
u/thomheinrich 10h ago
There's a big difference between 400k of stale grep outputs and failed test runs versus needing headroom for one giant burst. If a single tool call dumps huge stack traces or twenty large files at once, a hard 400k ceiling just crashes mid-turn. You want old session noise cleared early, plus room for spikes.
5
u/ClemensLode Senior Developer 12h ago
Auto-capping at 200 or 300 can save a lot of tokens.
2
u/NaturalCriticism3404 11h ago
The usage is too high that's why
2
u/AryanThakor 4h ago
the 400k default is mostly about what each turn costs. every message resends the whole history, so at 800k even a one line ls burns 800k of cached input against your limits. 1m still makes sense for the doc heavy agent stuff people mentioned above, just not as the default for coding sessions where most turns are tiny
2
u/K_M_A_2k 12h ago
The rule of thumb for a long while was don't let cc go over 40 percent of context window which lines up with this perfectly
-2
u/Outrageous_Band9708 13h ago
https://github.com/Druthulu/ProjectArchitect
i dont compact, i dont clear. shit i dont even /exit.
my solution works forever in a single session.
it uses very strict serial subagents, and ONLY subagents. thats right no main session model. it takes your input and forwards it to a subagent and drops it from my session context before it touches a model.
its the next generation of agentic coding.
SWE by trade. over a year of work to get PA in its current form
1
u/Duckducklaugh 11h ago
My take after a few months of long sessions: I rarely want a session to get that big anyway. Around 200k I have it write down where things stand and what's left into a file, then start a fresh window that reads that file first. Answers stay sharper, and every message isn't resending a giant history.
Auto-compact is the part I avoid. The summary keeps the gist but drops exact details, like why we ruled something out, and then it walks right back into the same dead end.
Where 1M actually earns it for me is one-shot reading: a big diff across dozens of files, or a pile of logs where the bug only makes sense once you see all of it together. Load it all, get the answer, close the session. So 400k as the default and 1M when you ask for it seems about right.
1
u/ItstheSECopenup 7h ago
Haha they’re trying to stem the tide of lazy people like me who have like 10 sessions that are 12 hours old and have 900k in them each all firing up at once and wasting inference
I was wondering how long it would take
1
u/lFaythx 7h ago
You can change some flags and it'll be back at 1M context, then you change your compact threshold and you can use as much as you want. I'm using 450k-ish before compacting, because it gets slower, dumber and expensive.
1
u/powleads 5h ago
I read it as a default versus a ceiling. Most long sessions are carrying a lot of old stuff that no longer matters, so compacting earlier is a sensible thing to do for people who never touch settings.
The full window is for when the detail is the point: tracing a bug across many files and logs, or a big refactor where a summary might drop the one odd exception you found an hour ago. If I could write the state down in a short handoff note and lose nothing, I'd compact or start fresh. If I couldn't, I'd turn it up for that session.
1
u/cautistic-john 4h ago
bro use the full window for a pass where small details across files change the answer. Think of auditing a migration where the old schema, the backfill, and the rollback all have to agree on what happens to null values. Have Claude write down the exact files and lines behind each finding, then take that into a fresh session for the fixes. That way you’re carrying the evidence forward without carrying the entire audit into every edit.
1
u/cornmonger_ 4h ago
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE
1
u/Laicbeias 4h ago
i dont know i in the past added a scrpt that just shows how much context is in, in a few colors with a bar and that pretty much solved it to me. sometimes you do want to fill the full context, especially if its a massive follow up tasks where you have to evaluate things. the auto compact is annoying af
1
u/ThinRedLine87 3h ago
Their are uses for ai outside code that require the window to be larger
1
u/sixtyonesymbols 3h ago
1M is good if 1M is needed. 1M is not typically needed. But sometimes it is.
1
u/StoneCypher 3h ago
because you can change it
1
u/macholusitano 3h ago
Because you can turn auto-compacting off when you need it. In most cases you probably don't.
1
u/emptyharddrive 2h ago
I ended up setting mine to 650K actually, across the board.
I had the same suspicions when I first saw this but on paper I can see the case for 400K. A long coding session can accumulate dozens of file reads, test runs, and tool outputs that have very little to do with the work left to finish. If Claude is going to make another hundred small tool calls, even cached history costs something to carry on every turn. Anthropic has every reason to want to save that compute. I have every reason to want those turns to run faster and use less of my allowance.
I’m trying 650k because there are enough sessions where I’d rather finish an investigation and journal the findings while the evidence is still in-context.
I haven’t seen a benchmark comparing 400k to 650k to 1M, but I'm going to split the difference anyway.
I’d still set 1M if I were doing a big audit where the old schema, the backfill, and the rollback all have to agree and you can set it as a 1-off in a session.
1
u/JSDevLead 2h ago
I had already disabled this feature once and they pushed out an update turning it back on. Super annoying to have it spend minutes compacting in the middle of an important session. It’s back off again.
1
u/Few-Divide1870 2h ago
1M context is like renting a warehouse when all you need is a desk. But the moment Claude starts exploding your entire codebase, suddenly that warehouse doesn't seem so ridiculous 😂
1
u/Coolbanh 2h ago
Now i understand why my usage finishes faster while conversations auto compact. I'll try to turn it off and see if its better.
1
u/ElectricDreams9876 38m ago
LLMs get worse the larger the context, keeping it under 40% keeps the integrity. But there are some use cases where more is required, like if you're feeding it a huge doc or it's analyzing a large code base.
And it's the default, but you can adjust it. It's amazing that you have at your fingertips an expert you can ask but instead you come here to hear from random strangers?
1
u/DuckiesKhaki 3m ago
Adjust it to your need and capability with the tool. Like a high end car some folks can’t handle all the power correctly (managing clean, detailed context) so a lower default can be safer / better for them. For power users, more context can be better for their tasks and to have the ability to push that window up is a huge deal.
1
u/gh0st777 12h ago
This type of question is the reason why we get people complaining they hit their rate limits so fast.
0
u/fishoa 10h ago
IPO went through, now the chainsaw is on.
And if you were using the 1m context window unironically in 2026, you deserve it.
0
u/taacton 10h ago
That’s just the default, you can change it but there’s no reason to assume anthropic haven’t used data to optimise that default to find the best trade off between cost and agent capability
0
u/Shpitz0 8h ago
Just because you CAN use 1m does not mean you SHOULD.
A good rule of thumb is that over 40% in any context window for an LLM introduces hallucinations.
The fact that things can fit into the context is not necessarily give an assurance that the model will properly handle all of it... It tends to miss more and more, as by design the model prioritized the system prompts + user instruction files (claude.md, .claude/rules etc) and the latest x messages and files.
This is actually a good thing, it will improve the quality and latency and costs.
Anyways, you can always increase it.
0
u/Icy-Excitement-467 3h ago
There is no reason. Just crank up auto compact threshold and preferably never hit it or come close. But a low number is better for blind bloodrage vibe coding.
-5
u/SignatureSeparate132 12h ago
You don’t need more than 400K with proper context management and handoff file. Otherwise accuracy gets lost and consumption becomes more expensive as every new prompt sends for processing everything that the LLM had received already.
I explained this also here and a mitigation around the problem https://sasa-fajkovic.com/2026-11-25-better-auto-compact/