Three months into running Claude Code on serious projects, a pattern becomes hard to ignore: the agent is always a few edits behind reality. It reads your codebase at session start, makes changes, then continues reasoning about files as they were - not as they exist after each modification. For short sessions touching one or two files, this barely registers. For longer autonomous runs across a codebase, it compounds: incorrect references, mismatched assumptions, edits that conflict with changes made three steps earlier.
A developer has built a community tool specifically to address this. The fix introduces rewind-and-replay mechanics - giving the agent the ability to step back to earlier states, replay edits in sequence, and track a live picture of every file as changes accumulate during a session. The goal is that the agent stays ahead of its own edits rather than reasoning from a snapshot that's increasingly out of date.
In-Session File Drift
Stale context in AI coding agents isn't an edge case - it's a structural issue with how most agentic tools manage state. Agents like Claude Code load context at session start and don't automatically refresh it when files change mid-session. The agent's internal model of your codebase drifts from what's actually on disk over the course of a run.
This matters most during the kinds of tasks people are increasingly pushing AI agents toward: refactoring a module, scaffolding a feature from a spec, running a multi-file cleanup. The more ambitious the task, the longer the session runs, and the more the drift problem compounds. Shorter, targeted sessions rarely hit it.
The "rewind" capability the tool advertises also addresses a related problem: recovering when the agent goes off track. Instead of manually figuring out which edits to reverse, you can step back to a known-good state without guessing.
Anthropic's context management tools in Claude Code currently target conversation length and token limits (the amount of text the model can hold in its working memory at once) - not in-session file drift during autonomous runs. Community-built solutions filling this gap suggest the problem is real and common enough that users aren't waiting for an official fix.