You have been working with Claude Code for twenty minutes. Everything is going well. The project is taking shape. Then something shifts.

Claude suggests a change you already rejected. It modifies a file it should not touch. It repeats something it said ten minutes ago as if it were new. The quality of the conversation drops — subtly at first, then noticeably.

You are experiencing context rot.

What context rot is

Every AI conversation has a memory limit. Claude can hold a lot — but not everything, forever. As your session gets longer, the AI accumulates every message, every file it read, every change it made, every correction you gave it. Eventually, that pile of context starts to crowd out the important stuff.

Think of it like a desk. You start with a clean surface: one task, clear instructions, full attention. An hour later, the desk is covered in notes, drafts, reference material, and old revisions. You can still see the thing you are working on, but your attention is split across everything else.

That is context rot. The AI has not become less intelligent. It is drowning in its own history.

The warning signs

You will recognise these once you know what to look for:

  • Claude repeats itself. It suggests something you already discussed, as if hearing it for the first time.
  • Claude contradicts itself. It makes a change that breaks something it fixed five minutes ago.
  • Claude ignores your instructions. Not deliberately — it has genuinely lost track of what you said earlier.
  • The quality drops. Responses become more generic, less specific, less attuned to your project.
  • Claude makes changes you did not ask for. It is “helping” based on context you forgot was in the conversation.

If you notice two or more of these, you are past the tipping point.

The thirty-second fix

Start a new session.

That is it. Close the current session and open a fresh one. Your project files are still there. Your memory file (CLAUDE.md) is still there. The only thing you lose is the conversation history — which is the thing that was causing the problem.

In your new session, give Claude a fresh, clear description of what you want to do next. Do not reference the old session. Do not say “continue where we left off.” Describe the task as if it is new, because for Claude, it is.

How to prevent it

One task per session. The most effective prevention is the simplest: do one thing, then start fresh. Building a page? One session. Adding animations? New session. Fixing a bug? New session. Each focused session stays clean.

Commit before switching. Before you close a session, tell Claude to save your progress. “Commit everything and push.” Now your work is safe and the next session picks up from a clean state.

Use your memory file. Anything you want Claude to remember across sessions goes in your CLAUDE.md — your preferences, your aesthetic, your project rules. This survives session restarts. The conversation does not.

Watch the length. If a session has been going for more than 30-40 messages, start thinking about whether it is time for a fresh one. You do not need to wait for the warning signs.

The deeper dive

This article gives you the survival skill: recognise it, restart, prevent it. If you want to understand the mechanics — how to compact context mid-session, how to structure your memory file for maximum adherence, how to delegate work to subagents so your main session stays clean — that is covered in Context Management in Claude Code.

The short version: fresh sessions are your best friend. Every vibe coder who has been at it for a month learns this instinctively. Now you know why.


Art & Algorithms publishes guides, tutorials, and prompt packs at the intersection of art and code. Subscribe for the full archive.