Glossary · Term

context replay

← all terms

Definition

Plain language

A trick that lets a forgetful AI agent 'remember' its past by re-feeding it its entire history of steps on every new turn.

As stated in the literature

In agent scaffolds, the practice of re-sending the full accumulated trajectory (commands, outputs, edits) into a stateless model on every step; replay cost grows with history length and can dominate token usage on long-horizon tasks.

Why it matters: It is the simple workaround that gives a memoryless model a sense of history, but its cost balloons on long tasks and can swallow most of the budget.

For example, an agent fixing a bug across fifty steps re-reads every command and output from steps one through forty-nine before taking step fifty, so its reading load keeps growing.

Heard on the show

“That's called context replay.”
Episode 125 — AI Coding Agents Run a Marathon, and Fewer Than One in Three Finish

Mentioned in 1 episode

  1. 125
    AI Coding Agents Run a Marathon, and Fewer Than One in Three Finish

Related terms