Agent Anti-Patterns · ~6 min
One session, running all day, doing everything. It feels efficient. It is quietly poisoning every task after the first.
It's tempting to keep one Claude Code session open and pile tasks on: review a PR, then start a feature, then debug a test. Each task leaves residue — file contents, command outputs, failed approaches, off-topic reasoning. The context fills with the leftovers of work you've already finished.
A developer reviews a PR all morning, then scaffolds a feature, then chases a flaky test — same session. By the third task the window holds diff hunks, file reads, and unrelated error logs. Ask Claude to name a new service class and it may anchor on naming patterns from the PR rather than the feature in front of it. The history isn't just dead weight; it actively steers the current decision.
The Claude Code best-practices docs name this directly: the kitchen-sink session, where context full of irrelevant information degrades the current task. Independent research by Chroma on context rot corroborates it — across 18 frontier models, performance varies with input length even on simple tasks, and irrelevant tokens degrade reliability more than length alone would predict.
One objective per session. When you finish and move to something unrelated, start a new session — not
a /clear in the old one. Session history is saved locally, so a fresh start loses nothing.
Use /clear only between loosely related tasks where shared background still applies, and
/rename to give sessions findable names like oauth-migration.
A fresh session re-reads CLAUDE.md and shared context. If two tasks share heavy background — a codebase you already walked, an architectural decision you established — that reload can cost more than the noise it removes. Auto-compaction also helps: if it fires before quality drops on loosely coupled tasks, an explicit split may be unnecessary. Split when shared history actively misleads.
/clear only for loosely related work where shared background applies.--continue / --resume bring threads back.Retrieval practice — recall, don't peek
Question 1The kitchen-sink session degrades quality because…
Question 2The recommended rule of thumb is…
Question 3Starting a new session is safe because…
Question 4Splitting sessions can backfire when two tasks…
Question 5 · spaced recall from Lesson 01Anthropic's goal for context is the…
/clear and a true new session, or when
sub-agents beat both? Next in Part 1: Distractor Interference — why even relevant context can
drag down compliance.