AI CompendiumA public chart of the language
Home / Agents & Harness / Clearing
Agents & Harness

Clearing

also called Context reset, Fresh start

Deliberately throwing away the context to get a clean head.

Definition

Starting a new session instead of continuing a tired one. The old context is abandoned — sometimes after salvaging a summary — so the model reasons without accumulated noise.

Clearing is the main cure for a session that has drifted. It feels wasteful right up until the point you try it and the task becomes easy again.

Clearing is the cheapest available quality intervention and the hardest to remember to do, because the session feels like progress. The signal to watch for is repetition: when the agent starts re-trying things it already tried, the context has become a liability.

How people use it
An agent stuck in a loop of failed fixes.
"Clear it. Tell it what we know and let it approach fresh instead of defending three bad attempts."
Worked example

Restarting beats correcting

A session has accumulated three rejected approaches.

A correction adds a fourth instruction that the model must weigh against the three failures still in context. A clean session with a brief that says "we tried X and Y, both failed because Z" is faster to a good answer and cheaper.

Sources
  • blogEffective context engineering for AI agents ↗Anthropic Engineering · 2025

    Defines context engineering as curating everything supplied at inference, names context rot, and covers just-in-time retrieval, compaction and keeping the window high-signal.

  • docsClaude Code overview ↗Claude Code docs · 2026

    A first-party description of the surfaces an agentic coding tool ships on, including parallel sessions and long-running tasks. Not evidence that it improves productivity.

Related terms