We build Argentic, so weigh what we say about it. Every Argentic number names the engine version and model it came from.
Context degradation, often called context rot, is the name for this: An agent getting less accurate, less consistent and less capable as a run gets longer, because what the model reads on each turn has grown, been trimmed or been summarized. It is the same model with the same instructions, and a run that was fine in the first hour is wrong by the eighth. Builders usually describe it as "my agent runs out of context and gets worse after many tokens".
What does context degradation look like?
The reports are consistent: it forgets a rule it was given at the start; its running counts drift; it reopens work it already finished; it contradicts a decision it made hours earlier; its prompt, and the bill, grow with every step. None of these raises an error. The agent keeps working and keeps sounding sure of itself, so the first sign is usually a customer or a log line.
What causes it?
Six things, and most long runs hit more than one.
The history outgrows the window. When the prompt is the conversation so far, a long run eventually has more history than the model can take. The loop has to drop something, and the oldest messages go first. The rule you gave at the start is the oldest message there is.
A summary replaces the detail. Compaction asks the model to summarize old history so the run can continue. The model writes it before anyone knows what the next hour will need, so an ID, an error or an exception to a rule can be dropped or blurred. The next summary is then written from the last one.
A long prompt is read unevenly. Researchers found that models use information in the middle of a long input less reliably than information at its start or end (Liu et al., "Lost in the Middle"). A window that still has room is not the same as a prompt the model reads well.
Running totals drift. A count the model keeps in its own notes ("17 left") is rewritten every time it changes, and an off-by-one in hour two is still there in hour ten.
Old facts sit beside new ones. When a price or a decision changes, the history still holds the old one. If nothing marks it as replaced, the model can quote either.
Notes skip the detail that mattered. An agent that writes notes for itself decides what is worth keeping before it knows what will be asked.
What fixes it, and what does each cost you?
A bigger window postpones the problem. Every call re-sends the whole history, so each step costs more than the one before, and the model still reads a long prompt unevenly.
Dropping the oldest messages is the simplest cap. It loses early rules unless you pin them somewhere that never gets dropped.
Compaction keeps the run going and gives up detail. It is the right tool for a run of a few dozen turns with someone watching.
A memory layer such as Hindsight, Mem0 or Zep stores facts outside the prompt and returns the relevant ones when your code asks. Your loop still decides what goes in the prompt, and what is stored is what the layer extracted, not a full record. The comparison reads each from its own docs.
Keeping a full record of the run and building each prompt from it, under a size cap, with the agent able to search the record for an old detail, is the approach we took. What it gives up is control: the code that chooses what fits in the prompt can choose wrong, and a detail it left out stays out until the agent searches for it. Why we rebuild instead of append has the longer version.
How do I tell whether my agent has it?
Run a test as long as the real job. At the start, tell the agent five things: a rule, an ID, a number, a name and a decision. Around the middle, change one of them. Ask for all five at the first hour, the middle and the end, and score each answer. Log the prompt size on every call too. A sudden drop marks a trim or a summary, and a steady climb means the bill is climbing with it.
Run it twice. A single run cannot separate a change from luck, and our own scores vary between runs of the same setup.
What happens when the prompt window is smaller?
Compaction is the second cause above. To see what a smaller window does to a long run, we ran the same shift with the prompt window held below the model's own, so a stack that cuts its history has to do it inside the shift. We have no comparison against LangChain Deep Agents and Claude Agent SDK that stands: both ran without their recommended memory setup, so those results are withdrawn and a rerun is pending. Against Letta, Against Letta, across the two conditions both ran (Claude Haiku 5.5, seed 20261217, one run of each stack in each row, November 27, 2026 to November 28, 2026; Argentic on engine 0.116.3), Argentic was level over 12 hours at a 200K window (engine 0.116.3 0.83 against Letta 0.82, first of two; within 0.03, which one run cannot separate); scored higher over 12 hours at a 100K window (engine 0.116.3 0.80 against Claude Agent SDK with memory 0.62 and Letta 0.59, first of three). With its step fee counted it cost less over 12 hours at a 200K window and cost more over 12 hours at a 100K window. None of these rows has been rerun on the newest engine (0.116.4), so they describe an older build.
The recall-type questions are recall at distance, current value under change and standing instructions. Argentic did not hold perfectly: on engine 0.116.3 it scored 0.85 over hours 1 to 5 and 0.78 over hours 6 to 12, and 0.80 in the last hour on 44 questions. Its lowest scores were on contradictions caught (0.04), commitments (0.48) and conflicting updates (0.58), not on the recall-type questions above. The benchmark guide has every row and links each run.
For what each stack does when its window fills and how to protect a detail inside it, see the guides for any stack, the Claude Agent SDK and Deep Agents.
What have we measured?
Argentic is an engine that keeps AI agents right for hours while prompt size is bounded. In our 12-hour shop run (engine 0.48.1, Claude Haiku 5.5, one run) the median prompt was 9,775 tokens over the first 20 calls and 24,428 over the last 100, and the largest of 952 calls was 43,431. In our 25 November run of the shop shift (engine 0.104.3, Claude Haiku 5.5, one run, 900 events sent back to back), one agent answered 89 of 91 questions about earlier facts right, and its prompt stayed bounded.
That is one model and one run of each stack in a row, and nothing we have measured at stock settings goes past 12 hours. The one longer run is 14 working days at a 200,000-token window (Claude Haiku 5.5, November 29, 2026), one run each of Argentic engine 0.116.4: it was run at a smaller prompt window than the model's own, so it is not a stock-settings result, and nothing is measured longer. With its step fee counted, Argentic cost more than Letta over 12 hours at a 100K window. Every run's rows are public.
Short answers
- What is context degradation in AI agents?
- An agent getting less accurate, less consistent and less capable as a run gets longer, because what the model reads on each turn has grown, been trimmed or been summarized.
- What is context rot in AI agents?
- Context rot is the common name for context degradation: an agent getting less accurate as a run gets longer. Some writers use it for the narrower effect of a model reading a long prompt less reliably. This post uses context degradation for the whole symptom.
- What causes context degradation?
- The history outgrows the window, a summary replaces a detail, a long prompt is read unevenly, running totals drift, old facts sit beside new ones, and an agent's own notes skip the detail that mattered.
- How do you fix context degradation?
- A bigger window postpones it, trimming loses early rules, and summaries blur detail. Keeping a full record outside the model and building each prompt from it under a size cap avoids both, at the cost of the code that chooses what fits.
- How do I tell whether my agent has it?
- Plant five facts at the start, change one in the middle, and ask for all five at the first hour, the middle and the end. Log prompt size on every call and run the test twice.
Sources and method: 11 hours 59 minutes on shift: what the agent remembered.