Technical 9 min read | January 2026, updated November 19, 2026

Your Context Window Forgets: Six Ways AI Agents Lose Continuity and How to Catch Every One

AI coding agents lose their place in six ways — including Claude Code /compact, crashes, and model switches. Here is what breaks continuity, what official compaction actually keeps, and the architecture that catches each failure.

Put the plan somewhere the window cannot forget

If your agent just compacted, crashed, or started a new session blank, leave your email. We'll send the setup tutorial, and you can tell us which agent you use, before any price is shown.

Step 1 of 4

This needs to be a real email — we'll email you in a few minutes.

No spam. Unsubscribe anytime.

The Window Is Not Memory

Every AI coding assistant has a context window. It feels like memory. It is not. It is a scratchpad — one that fills up, gets summarized, and can vanish entirely when the process crashes, the model switches, or the session ends.

This distinction matters because developers build trust with their AI assistant over the course of a session. Decisions get made, architecture gets discussed, trade-offs get weighed. All of that lives in the transcript — until it does not. And there are more ways to lose it than most people realize.

Six Ways Continuity Breaks

Each row below is a different failure mode. They feel similar ("the AI forgot") but have different causes and different catches.

What breaksWhat it feels likeWhat catches it
Window fills upAgent "forgets" early decisionsAuto-memory (durable facts) + todo-mcp tasks (the plan)
Compaction / summarizationDetail goes fuzzy mid-conversationContext breadcrumbs re-hydrate the depth
Crash or process killedEverything in flight is goneWrite-ahead breadcrumbs + context_resume
Model switchNew model has no idea what is happeningState lives in the MCP, not the model — handoff is clean
Session ends, you come back tomorrow"Where was I?"context_resume + todo_list + sprint-resume memory
Multi-week projectStrategic thread lost across sittingsTasks with dependencies, one in progress at a time

Six failure modes. One persistent store that catches all of them.

Failure 1: The Window Fills Up

Context windows have a token limit. As the conversation grows, earlier messages are summarized or dropped. The agent retains the gist but loses the specifics — the exact interface you agreed on, the reason you chose one approach over another, the edge case you discussed twenty minutes ago.

The catch: anything that must survive goes into a durable store before the window needs to discard it. Auto-memory holds stable facts and lessons. Todo-mcp tasks hold the strategic plan. Neither depends on the transcript staying intact.

Failure 2: Compaction Hits Mid-Conversation

This is the subtle one. Two hours into a dense design conversation, the window compacts. The summary preserves the outline but loses the texture — the specific field names, the exact error message that led to a decision, the ordering constraint you worked out together.

The catch: the working depth should never live only in the transcript. The task list holds the structure of the work. Progress breadcrumbs hold the fine-grained state. Auto-memory or a dated decisions file holds the rationale. When compaction hits, the agent re-reads those sources and the next reply can land at full fidelity. That re-read is not automatic. Claude Code's own docs list what is re-injected after /compact (root CLAUDE.md, plan-mode plans, a handful of recent files) and what is not (conversation-only decisions, a PLAN.md nobody told it to open). We collected the official list, a five-minute recovery, and a hook example in Claude Code /compact dropped your plan.

Failure 3: Crash or Process Killed

The CLI crashes. The container gets killed. The SSH session drops. Unlike compaction, which preserves a summary, a crash preserves nothing from the conversation.

The catch: write-ahead breadcrumbs. As the agent works, it drops a progress marker after every meaningful step — before it needs them. The same principle databases use to survive power loss. On restart, context_resume reads the breadcrumb and the agent knows exactly where it was: what is done, what was in progress, what is next. Recovery takes seconds, not the twenty minutes of re-derivation it would otherwise require.

Failure 4: Model Switch

You use a powerful model for the hard design work, then hand off to a faster model for routine execution. Or your tool switches models under the hood. Either way, the new model starts with zero knowledge of what came before.

The catch: state lives in the MCP server, not inside any single model. The new model runs context_resume, reads the same tasks and breadcrumbs, and continues from exactly where the previous model left off. No re-explanation needed. The state never lived in the model to begin with — so swapping the model does not lose the state.

Failure 5: Session Ends, You Come Back Tomorrow

You close your laptop Friday mid-sprint. Monday morning, a fresh session has no idea what you were doing. This is the most common continuity break and the one most developers have simply accepted as the cost of working with AI.

The catch: context_resume is the first command of every session. It returns the active sprint, the task in progress, recently completed tasks, the next recommended task, and any open context. Zero ramp-up. Cold start to fully oriented in one command.

Failure 6: Multi-Week Projects

A project spans weeks. Individual sessions work fine, but the strategic thread — what has been done, what depends on what, what the overall arc looks like — gets lost in the noise of daily work.

The catch: todo-mcp tasks carry permanent IDs and explicit dependencies. Task #8 depends on #7; the agent will not start #8 until #7 is complete. The backlog is always readable, always sequenced, and always reflects the true state of the project — not a stale snapshot from a planning session three weeks ago.

The Architecture Behind the Catches

These six catches are not six separate systems. They are different views of the same three-system architecture:

  1. Auto-memory — stable facts, preferences, lessons. Its index loads every session.
  2. Todo-mcp tasks — strategic work units with IDs and dependencies. Persistent across sessions.
  3. Todo-mcp context — write-ahead breadcrumbs for crash protection. Cheap, frequent, durable.

Each system handles a different kind of state at a different cadence. The progress checklist you see is drawn from these three on demand rather than stored separately, so it is always current. Together, they ensure that no matter which of the six failure modes hits, the agent has what it needs to continue without losing its place.

What Recovery Actually Looks Like

Here is the shape of a cold-start recovery — Monday morning, fresh session, no transcript:

Active sprint:   Identity & Restore
In progress:     #7 Harden auth module  (blocked on test fixture)
Recently done:   #4, #5, #6
Next up:         #8 Wire restore-integrity checks  (depends on #7)
Open context:    decision — DB stays per-environment; coordinate via files

The agent reads this and immediately knows: resume task #7, build the test fixture that was blocking it, then move to #8. No re-reading the repo. No "remind me what we were doing." One command and the session is oriented.

The Core Frame

The context window is shallow and volatile. Todo-mcp is deep and durable. Skills are the protocol between them — the versioned procedures that ensure state moves from the volatile window into the durable store in the same trustworthy way every time.

Your context window will forget. Your project does not have to.

Getting Started

If you are already using Todo-MCP, you have all six catches in place. The mastery documentation walks through the breadcrumb protocol, the task dependency model, and the session-start sequence that ties them together.

If you have not tried it yet, start with the problem you feel most: if it is crash recovery, read about the breadcrumb pattern. If Claude just compacted and the plan went fuzzy, start with what survives /compact. If a long ChatGPT thread forgot your file, use the new-chat handoff. If Cursor forgot an earlier request or a new Cursor chat started from zero, see carrying context between Cursor chats. If you want the session-continuity model in one place, the three-system architecture is where it fits together.

Put the plan somewhere the window cannot forget

If your agent just compacted, crashed, or started a new session blank, leave your email. We'll send the setup tutorial, and you can tell us which agent you use, before any price is shown.

Step 1 of 4

This needs to be a real email — we'll email you in a few minutes.

No spam. Unsubscribe anytime.

Frequently asked questions

What is the difference between a context window and memory?
The context window is the scratchpad for the current session. It fills, gets summarized, and can vanish in a crash or a new chat. Memory, in practice, is whatever lives outside that window: a file, a CLAUDE.md, a Project upload, or a task store the agent can read back.
What should I do right after Claude Code /compact?
Write down any decision that only lived in the chat, then have Claude re-read your plan and decision files — or use a SessionStart hook on the compact source. We walk through the official survive-and-drop list in the companion article on Claude Code compaction.
Why does a long ChatGPT chat forget a file I can still scroll to?
You can see the transcript; the model is working from a limited window. Start a new chat with a short context pack rather than pushing the same thread. See the companion article on long ChatGPT chats.
Does Todo-MCP replace CLAUDE.md or ChatGPT Projects?
No. Standing rules still belong in CLAUDE.md or project instructions. Todo-MCP holds tasks, dependencies and session context in a local SQLite file for MCP-capable clients. In ChatGPT it runs from the desktop app (Work or Codex), added under Settings → MCP servers; the ChatGPT website and phone app connect only to remote MCP servers.

Continue Reading

Back to all articles