Drop the Bloat
A field note on cutting my Claude Code setup’s starting context from roughly 35K tokens to about 13K, and deciding what still earns its place.
I’ve been using AI tools since ChatGPT launched, and coding agents since early tools like Replit Agent became genuinely usable. That has been long enough to watch a few confident waves come and go. Prompt engineering was going to be the next job; then came ever larger piles of instructions, tools, and guardrails; more recently, agent loops. Now the advice changes about every two days, and keeping up on X could be a full-time job.
So take this as a field note from my own Claude Code setup. Before I trimmed it, a new session started at roughly 35K tokens of context. Afterward, I remember seeing about 13K. Those figures are approximate, but the drop was large enough to make me ask a simple question: how much of the context we give an agent is actually helping it?
Context is a performance budget
I now treat context as a performance budget, not empty space. Every instruction, tool description, file, and conversation turn competes for attention while adding latency and cost. What matters most is whether the model still does good work while I am steering it.
Whether an advertised context window is useful all the way through remains an open question. Needle-in-a-haystack tests measure retrieval; broader tests add multi-hop tracing and aggregation. Like all AI benchmarks, their results belong to a particular model, harness, prompt, workload, and evaluation setup. I find them useful, but the conditions matter too much to turn them into universal rankings.
In my experience, somewhere after 150K–200K tokens, models start getting dumber. That’s a rough heuristic. Codex defaults GPT-5.6 to about 258K effective tokens before automatic compaction, although the model can accept more. That makes me suspect operating below the maximum may help. The product limit alone cannot tell me that. ChatGPT Product Lead said a recent limit change came from subscription usage accounting; cost, latency, capacity, or product constraints could also explain it.
Anthropic says Opus 5 stays consistent across its one-million-token window, but the guide does not show the benchmark or methodology. I treat neither product limit as the boundary. My rule is behavioral: once the agent loses instructions, repeats avoidable mistakes, or creates more repair work than a clean handoff, the context is working against me.
Measure once, then remove what doesn’t earn its place
Open a fresh Claude Code session and run /context all. Measure what loads at the start, clean it once, and see what changed.
Keep CLAUDE.md for gotchas. Move procedures into on-demand skills and detailed plans into artifacts, tests, mockups, or code.
Use /mcp and the system-tool breakdown to disable surfaces you do not use.
If Artifacts or multi-agent workflows are rare in your setup, turn off Artifacts and Dynamic workflows in /config. Those were two of my largest cuts.
Anthropic reports that it cut roughly 80% of Claude Code’s system prompt without measurable loss on its own coding evaluations. Newer models may not need scaffolding accumulated around older ones.
Matt Pocock’s walkthrough helped inspire my cleanup. Its switches are version-specific, but the measure, cut, re-measure loop holds up.
Want the one-shot version? I packaged the process as a portable drop-the-bloat skill for Claude Code and Codex. It inventories persistent instructions, skills, MCP servers, plugins, system tools, and other persistent surfaces. You choose a conservative, balanced, or aggressive pass; it measures a fresh baseline where possible, ranks the prompt and tool payload with a local diagnostic proxy, and proposes reversible cuts. Nothing changes until you approve each item, and it re-measures afterward.
Prefer the smallest useful interface
Trimming Claude Code is one route; another is starting with a smaller harness.
Pi has a minimal system prompt, loads skills on demand, and keeps MCP out of its core. You add only what you need through extensions: subagents, web search, or your own tools.
In Composio’s comparison six harnesses ran the same 26 tasks with Kimi K3. Pi completed 19 tasks, behind Kimi Code’s 21 and Hermes Agent’s 20, and tied with Claude Code. It also had the lowest median latency at 162 seconds and tied Hermes for the lowest median cost at $0.29. Codex completed 17 tasks. Claude Code averaged $1.47 per task versus Codex’s $0.47, roughly three times as much. Its median run was also slower: 348 seconds versus 236.
That looks like strong value in this setup. LatchBio found a different pattern when it held Opus 4.8 fixed: Pi beat Claude Code on short tasks, while Claude Code led on long ones. Choose the smallest interface that still works reliably.
Minimalism has costs too
Some things should stay available. A daily Slack integration may save more time and context than it consumes. A skill the agent should discover cannot be hidden until invoked. The goal is the smallest prompt that still does the job.
Clearing also has a cost when decisions live only in chat. Before /clear, ask the agent for a compact handoff and save the important state in durable project artifacts. This can be a reusable skill. Matt Pocock’s handoff writes a compact note and points back to existing artifacts. Every’s ce-handoff goes further, adding searchable metadata and a resume mode that stops before taking action. Clear only when the next session can recover the current state and next step without reconstructing the conversation.
I remove surfaces that repeatedly fail to pay rent, and restore anything whose absence makes the work worse.
Know when the session has changed phase
Starting lean solves only the first half. During planning, I reveal detail as needed and watch behavior, not a token counter. When mistakes and repair work cost more than a reset, I compact or hand off.
In my experience, Codex preserves continuity after compaction better than Claude Code. Thomas Ip reports something similar, though a handful of practitioners comparing notes is a long way from a controlled comparison.
Both Claude Code and Codex let you adjust their automatic-compaction thresholds and set up hooks; those are knobs to tune for yourself, and I won’t pretend to have a recipe.
Once a plan is settled, implementation is a different phase. Claude Code’s plan-accept screen can clear context before implementation. The option is hidden by default, but showClearContextOnPlanAccept: true restores it. Implementation can then start from the approved plan instead of carrying the negotiation forward.
None of this argues for resetting a productive implementation run. Once the goal is clear and captured in a plan and tests, I can increasingly leave frontier models to work for hours without watching or babysitting them. That is part of why spending time actively planning can pay off.
Try it once, then get back to the work
This is a one-shot cleanup, not a new hobby. Cut the obvious bloat once, keep what helps, restore what hurts, and stop. Continually optimizing context is not a meaningful use of time.
Afterward, keep the idea in mind. It matters most while steering a large planning session or on small tasks where overhead is easiest to feel. Models and harnesses change too quickly for a fixed recipe. Nobody hands out prizes for the smallest context window. Give the agent enough to do good work. Anything beyond that has to earn its place.








