---
title: "What is context rot and how do you prevent it?"
description: "Context rot is lower model output quality caused by stale, duplicated, conflicting, or irrelevant content in the context window. Causes and prevention methods."
canonical: https://past.dev/glossary/context-rot
last-updated: 2026-08-31
---
# Context rot

Source: https://past.dev/glossary/context-rot

Context rot describes lower model output quality when a context window contains stale facts, near-duplicates, contradictions and irrelevant history. Symptoms include outdated answers, contradictions between turns and ignored instructions. Reduce it by selecting current, relevant content for each call. A larger context window does not fix the problem.

## How context rot develops

1. A session or pipeline accumulates history faster than it prunes.
2. Facts change, but both the old and new statements remain in context with equal standing.
3. Near-duplicate passages accumulate from repeated retrievals.
4. The model's attention spreads across the accumulated mass, and answer quality drops even though the window has room.

A larger context window delays capacity limits but does not remove stale, duplicated or conflicting content.

## Context rot vs memory staleness

Memory staleness is a storage problem in which outdated facts remain marked as current. Context rot is an assembly problem in which the prompt contains too much stale or irrelevant material. Systems need both correct stored state and selective prompt assembly.

## Preventing it with a temporal memory layer

Move history into external storage and assemble a smaller context for each task. [Supersession](/glossary/fact-supersession) identifies current and previous values. Ranked evidence with dates lets the caller include only relevant support. An explicit conflict status preserves disagreements for application handling.

past.dev recall returns ranked, dated evidence with a `status` value. [Context engineering](/context-engineering) covers prompt assembly. The [quickstart](/docs/memory-api/quickstart) shows the recall call. The [benchmark method](/benchmarks) includes long-history tests.

## Signals your system has context rot

- Answers cite values you know were updated.
- Quality degrades over a session while token counts climb.
- The same passages appear repeatedly in assembled prompts.
- Trimming context by hand improves answers.

## Frequently asked questions

### Does a larger context window prevent context rot?

No. More capacity delays the limit but does not remove stale, duplicated, conflicting, or irrelevant content. Output quality still depends on selecting the current and relevant material for each call.

### Is context rot the model's fault?

No. The model attends to what it is given. Rot is created upstream, by storage that keeps no notion of currency and by assembly that sends everything available.

## Related

- [Context engineering](https://past.dev/context-engineering)
- [Memory decay](https://past.dev/glossary/memory-decay)
- [Fact supersession](https://past.dev/glossary/fact-supersession)
- [What is agent memory?](https://past.dev/what-is-agent-memory)
- [Quickstart](https://past.dev/docs/memory-api/quickstart)