At first, Claude Code feels like magic.
Clean code. Clear answers. Sharp insights.
But if you’ve ever noticed it drifting, misinterpreting your requests, mixing tasks, or producing something that just feels off, it’s usually not Claude’s fault.
It’s your context.
And more specifically: poisoned and compacted context.
When you build up context, you know exactly what’s in it.
You can see the messages, the instructions, the decisions.
But after a while Claude doesn’t just carry that forward. It compacts it. (read more about auto-compact here)
After multiple rounds of compaction, you’re no longer working with a precise, transparent context.
You’re working with a messy, uncertain one.
That’s where unpredictability creeps in. The model starts pulling from patterns you didn’t mean to set.
Here’s what I learned the hard way:
One day, I asked Claude to update code and deploy it.
Later, when I just wanted to experiment, Claude kept auto-linking “update” with “deploy.”
Why?
Because in its compacted memory, those two actions had fused into a single pattern.
I had unintentionally poisoned the context.
Context bleeding
Without explicit boundaries, Claude carries old assumptions into new tasks.
Instruction contamination
Too many competing rules in one thread (“always test before deploying” vs. “deploy immediately for hotfixes”).
Temporal confusion
Outdated instructions influencing fresh work.
Messy compaction
After enough compression cycles, Claude no longer has clean context just a fuzzy mix of associations.
You can’t stop Claude from compacting.
But you can manage the hygiene of your context:
/clear often – Reset before messy compaction sets in.
Separate sessions – Keep experiments, production, and notes apart.
Announce task boundaries – “End of feature A. Starting feature B.”
Use markdown structure – Format instructions so they stay isolated.
Be explicit – Spell out expectations instead of relying on Claude’s assumptions.
Review associations – Ask: what might Claude have accidentally “learned” from me?
Think of it like coding practices.
Messy code creates bugs.
Messy context creates unpredictable AI behavior.
When Claude feels inconsistent or “weird,” it’s usually not randomness.
It’s the messy, compacted, poisoned context you’ve been feeding it.
Claude Code is powerful, but it isn’t telepathic.
It runs on the patterns you set, and if you’re sloppy with context, it will make connections you never intended.
Clean context = predictable outputs.
Messy context = abnormal behavior.
The difference?
Your discipline.
No posts

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.