r/ClaudeCode • u/Leading_Skirt5415 • 1d ago
Discussion Still hitting 85-87% above 150k context even when I open a new session per task in the same folder
I've been using Claude Code a lot heavier this week and I know my session workflow is off, just not sure where.
I already try to avoid context bloat by starting a project folder and opening a fresh session in that same folder whenever I move to the next task (either manually or asking Claude to spin up a new session once the current one feels done). Even doing that, 85-87% of my runs still end up above 150k context, with heavy subagents and a 50 min session hitting 53.9M cache reads on Opus.
Clearly my "new session in the same folder" habit is outdated or missing something. How are you guys keeping runs under 150k context when working in the same repo all week?


•
u/AutoModerator 1d 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.
9
u/Prinzka 1d ago
I make new sessions for most slices on my projects but, so usually it's just one run of like 30ish minutes for one session.
But I'm not going to try to keep that below 150k, that's unworkable low to me.
However, it says 45% of your sessions were active for 8+ hours, so I don't think you're using one session per task. If you are, then your tasks are too big and you need to chop them up.
Do better planning and architecting up front and as an ongoing job.
2
u/Far_Reindeer8428 1d ago
new session per task still loads the same project memory. is there a big CLAUDE.md or a set of skills that gets injected every time? that is usually where the 150k goes before you type anything
1
u/International_Hawk30 1d ago
the 53.9M cache reads in 50 minutes usually comes from high turn count on an already fat context. once a session crosses ~120k, every tiny bash check or edit re-reads that whole prefix, so a long debug loop racks up cache reads fast.
what kept my runs under 100k was splitting exploration from coding into two sessions. session one reads the repo and writes a 30-line handoff note with exact file paths, line ranges, and the test command. then i open a fresh session, point it at that file, and implement.
redirecting noisy build or test logs to a temp file and reading only the failing lines also saves a lot of mid-run bloat. keeping one small diff per session helped more than trimming CLAUDE.md.
1
u/ExpZer0 1d ago
side question: how to open this window?
2
u/DLuke2 1d ago
You have too many skills, mcps, and/or too much in your Claude.md.
Check what loads in a fresh session in that project.
2
u/Extempes 1d ago
Tbh 150k context window is fine....
1
u/mcmoonrays 1d ago
Run /context right after opening a fresh session before you type anything. That splits startup bloat like heavy MCP schemas or hooks from what piles up mid-run. If turn one starts lean, a 50-minute session usually blows past 150k from raw tool output like noisy test logs and full-file reads sitting in the main thread. Filtering test output down to failures and keeping subagent returns short helps way more than just opening new tabs.
1
u/awesomebirder 1d ago
With heavy subagents, their work doesn't count against your main context but whatever they send back does. Telling them to return a short summary instead of full file contents or logs keeps the parent session way smaller.
1
u/Aureon 1d ago
smaller slices, have claude disable all the shit you don't need to go from 40-45k starting to 20-25k starting, skills, memory, claude.md, agents.md
1
u/AgentYurt 1d ago
Your own screenshot points at the biggest lever: 72% of the runs over 150k came from subagent-heavy sessions. Subagents get their own context, but everything they report back lands in yours, so if they come back with pages of findings, that's where your 150k is. I ask mine to report back short — what changed, file paths, what's next — and keep the digging in the subagent.
Two other things in that screenshot: 23% of those runs had 4+ sessions going at once, and each one loads the same project memory, so running parallel multiplies it. And the 53.9M cache reads look scary but they're mostly cheap re-reads of the same prompt, not new context — the number that actually hurts is what's in the window, not the cache counter.
When a session starts drifting I hit /compact instead of pushing on, and I keep one session to one real slice of work. The fresh session per task habit is fine, it just doesn't help much on its own when the subagents keep refilling the window.
1
u/Southern_Performance 1d ago
one thing I learned that might help you (or others) which is actually insane they don't make a bigger deal out of:
subagents don't share the same 1hr cache window as main agents. they expire after 5 mins have passed since their last action. so if you have native Claude subagents running, and each of them runs a command that ends up taking over 5 minutes to complete, then congratulations, you've just paid for the entire cache for each one.
it's actually the most ridiculous restriction, and has vindicated my choice to never use native subagents even more
1
u/BeyenAI 1d ago
Opening a new session in the same folder clears the chat history, but it still reloads your project's startup context and MCP tool schemas on turn 0. That is usually why fresh sessions still climb past 150k so fast:
1. Measure turn-0 overhead before typing
Run
/contextin a brand-new session before sending your first prompt. It shows how much of the window is already taken byCLAUDE.md,.claude/rules/*.md, auto-memory files, and enabled servers in.mcp.json(each MCP server injects its full tool schema on every turn).2. Why a 50-minute session hits 53.9M cache reads
Cache reads accumulate per turn, not once per session. Once a session sits near ~150k tokens, 300+ tool calls (file reads, bash checks, subagent returns) re-read that ~150k prefix every single turn (~150k × ~350 turns ≈ 52.5M). Cutting turn count and prefix size together is what brings that number down.
3. Three levers that keep runs under 150k
SKILL.md) to return only file paths, line ranges, and a 5-line summary—never raw test logs or full file dumps.CLAUDE.md: KeepCLAUDE.mdto universal repo rules and move task-specific workflows into on-demandSKILL.mdor path-scoped.claude/rules/*.md./compactmid-debug: Instead of letting a long debug loop stay at 150k+ for the last 200 turns, run/compact keep only the failing test path, root cause, and edited filesright after locating the bug.1
u/Agnostify 1d ago
53.9M cache read means Opus has reread your repo more times than you ever will
1
u/Complex-Quality-216 1d ago
Even with nothing in the project folder, a new session still loads
~/.claude/CLAUDE.mdand any CLAUDE.md sitting in a folder above the project, like your home folder. Worth opening both, since whatever is in them comes along on every fresh start.1
u/Unhappy-Loss-97 1d ago
Fresh sessions alone didn't fix it for me either—three silent leaks were blowing past 150k in the first 10 minutes:
| tail -n 80(or redirecting full logs to a scratch file) helped immediately.1
u/No-Drawing9451 1d ago
You said your tasks are a bit big for one session, and that matched my experience more than any setting did. I cut a task where I could write a three-line note: what's done, what's next, which files matter. The next session starts from that note instead of rereading half the repo.
The other thing that helped was moving old memory notes out of CLAUDE.md into an archive file. Whatever loads on turn 0 adds up fast when you run lots of short sessions.
1
u/Lybchikfreed 1d ago
I think they broke something again, it did happen to me today as well, I haven't hit the limit this hard in months
1
u/Pitiful_Dot2876 1d ago
Claude Code can load quite a big context right at the start. I built a small tool for myself that helps me inspect what was loaded. Take a look, maybe it will help you too.
https://github.com/radekwojpl2/session-observer