Fresh session. Sharper agent.
The agent has a working memory, the context window. Every message, file and error fills it. When it's crowded, quality drops.
Four Tools
/context
See how full the working memory is.
/clear
Start fresh. Best between tasks.
/compact
Summarise so far and keep going.
New task
New session. CLAUDE.md carries your rules over.
Signs it's crowded
It repeats a mistake you already fixed.
It forgets a decision from earlier.
Answers get slower and vaguer.
You're scrolling up to remind it.
Source: Anthropic Claude Code Docs ↗
One task, one session.