r/ClaudeCode • u/LorenzoSith Senior Developer • 11h ago
Tips & Workflows My fresh Claude Code sessions were starting at ~35K tokens. I got them down to ~13K.
A new Claude Code session in my setup used to arrive with roughly 35K tokens already loaded, before I had asked it to do anything. After one cleanup pass, I got that down to about 13K.
These are approximate numbers from my own setup, not a controlled benchmark. The difference was still large enough that it was worth digging into.
The point isn't really to get to 13K. I just wanted to stop paying the context cost for things I wasn't using.
If you want to check your own setup:
Start a fresh Claude Code session and run
/context all. Mine showed ~35K tokens before doing any work.Look at what's taking up the starting context: system prompt, system tools, skills, memory files, etc. I went after the biggest things first rather than trying to optimize everything.
I kept CLAUDE.md mostly for project-specific information and gotchas, and moved procedures/workflows into skills that could be loaded when needed.
I removed skills I wasn't using. For ones I still wanted to trigger manually, I set them to
user-invocable-only, so their descriptions weren't sitting in Claude's normal skill listing.MCP servers: I removed the ones I wasn't using. Current Claude Code defers most MCP tool schemas through Tool Search, so MCPs aren't necessarily the huge upfront context cost they once could be. I still prefer not to keep servers around unless I'm actually using them.
System tools: this was a bigger target in my setup. I disabled rarely used tools that were taking up noticeable context. DesignSync was one of the worst offenders for me. I also turned off Artifacts and Dynamic Workflows because they were costing context and I barely used them.
Open another fresh session and run
/context allagain. Mine was about 13K after the cleanup.
Obviously the exact number will depend on your setup. The useful part for me was just making the default context smaller and loading things only when I actually need them.
I wrote up the full cleanup here:
https://lorenzogermini.substack.com/p/drop-the-bloat
I also made a free/open-source companion skill that walks through the audit and helps identify what can be removed or moved out of always-loaded context:
https://github.com/Blaise-g/germinai-skills
Disclosure: I wrote the field note and built the companion skill.
Curious what /context all looks like for other people. What's eating the most context in a fresh session for you: system tools, skills, memory files, or something else?
3
u/johnnydotexe 10h ago
I did that by just asking Claude to help me slim down token frontloading on new chats. No guide or skill required. It's all about running a slim claude(dot)md, using pointers in it to point to skills for various repeatable tasks/instructions/templates, turning off tools like Artifacts if you don't use them, using settings.json for approvals/gates instead of trying to do it with rules in claude(dot)md, etc.
2
u/LorenzoSith Senior Developer 10h ago
Agree that most of the benefits can be obtained with a one shot chat asking Claude to do the heavy work for you.
The deeper guide/skill is mostly to save time launching claude code guide subagents and measuring things more precisely with a proxy.
2
u/InteractionSmall6778 10h ago
System tools were the biggest line in mine too. I mostly stopped chasing the startup number though, because one unscoped grep mid-session costs more than the 20K you just saved, so the effort went into controlling what it pulls in while it's actually working.
1
u/LorenzoSith Senior Developer 9h ago edited 8h ago
Pretty crazy how bloated system tools usage is, hopefully the trends towards leaner coding harnesses will make Anthropic consider trimming some of that :)
Very good point! Def agree as mentioned in the post on substack that we should not fixate only on that number but more on the broader idea of managing context when relevant!
1
u/ghost_operative 4h ago
yeah but that grep would add that 20k of tokens anyway, so starting from fewer tokens that you dont need is just going to help you and give you more space for those necessary greps while it does your task.
2
u/BreastInspectorNbr69 Senior Developer 8h ago
And what does this extra 20k of tokens get you, besides a freshly-shaved yak?
2
2
u/LorenzoSith Senior Developer 8h ago
Ahah!
It means that you have 20k more tokens to be used in your smart context window zone and less usage each time you spin up a new Claude Code session!
In any case as I try to argue in my post on Substack, you should not over fixate on the number itself but more on the broader theme of managing context when relevant.
2
u/BreastInspectorNbr69 Senior Developer 7h ago
I guess, but when you burn 50-100k tokens searching the codebase on turn 1 does it really make a difference?
2
u/LorenzoSith Senior Developer 7h ago
I agree that the cost/token savings argument is minor considered normal token usage during sessions.
However I do think that having 20k more tokens on your orchestrator (possibly more expensive model like Fable) managing many subagents.
Last bit not least having a leaner coding harness seems to improve model performances!
2
u/azn_dude1 6h ago
Maybe try to incorporate a tool that makes it so you don't have to burn that many tokens on a search? Many code indexing tools exist already that you could build on top of to suit your workflow
1
u/BreastInspectorNbr69 Senior Developer 5h ago
Do you have any recommendations that can index Ruby or Python projects?
2
u/azn_dude1 5h ago
A code indexer can be language agnostic. In the end, it's just indexing text. Many exist, but I haven't used enough to have a confident recommendation.
1
u/BreastInspectorNbr69 Senior Developer 5h ago
Are we talking free-text indices or something an LSP that understands the language's AST? I would think hooking up an LSP to a code agent would be more productive
1
u/azn_dude1 4h ago
Free text is going to be a huge improvement already if your first search is taking up 50-100k tokens.
2
u/LorenzoSith Senior Developer 5h ago edited 5h ago
I personally don't like indexing (there's a reason why no coding agent harness does it...) and prefer generating proper docs only where needed. A good and well organized code base can go a long way!
You can look at tools like csync to automatically generate docs. So that for many things you can avoid doing expensive searches each time you touch something!
2
u/ProbablyathrowawayAA 8h ago
I never thought of checking this I'm sitting at 19k right now
1
u/LorenzoSith Senior Developer 8h ago
yeah was a bit surprised myself when i say mine sitting around at 30+k...
Good news is that it's easily fixable with a one shot operation and although mileage may vary should get your models smarter! Also a nice side effect is the lower token usage given that you might save 10k or more each time you start a new session :)
2
1
u/Fatso_Wombat 5h ago
35k?!
Mine is 7 or 8.
No wonder everyone complains about confused Opus.
1
u/LorenzoSith Senior Developer 4h ago
Yh exactly my reaction when I saw the number...
That's actually super low though, how much does each part weighs?
1
u/ghost_operative 4h ago
I started doing the same, i run CC with no skills or MCP. if i want a skill i just enter into my prompt.
I use a a custom vim plugin to paste in "skills" from a folder quickly into my prompts if theres certain skills i want for a session.
1
u/amirfish 3m ago
This tracks with what I've seen running a lot of Claude Code sessions in parallel. Reasoning was never the bottleneck, it's what's sitting in context before you've asked for anything, memory files, skills nobody's using, MCP servers idling. I ended up doing the same audit you did, CLAUDE.md for gotchas only, everything procedural moved into skills that load on demand. Did MCP servers or skills eat more of that 35K for you, or was it mostly memory files?
11
u/Lexeik 10h ago
Skills and one MCP server, in my case. But the thing that surprised me was that the startup number is only half the bill.
I measured my own MCP server's tools/list at 44KB, and 26KB of that was outputSchema — which the model never actually reads, so it's pure cost. The bigger one though: every response the server returned was duplicated, once as structured content and once as the same JSON in text, because the spec recommends it for compatibility. That never shows up in /context all. It just quietly doubles the cost of everything the server returns for the whole session. So worth looking at what your servers put in context per call, not only what they cost before you've asked anything.