Skip to content

My LLM agents forget conversation history when I restart them, how do I fix this? ​

"My LLM agents forget conversation history when I restart them, how do I fix this?" The question is asked constantly and contains a mechanical error worth clearing before any fix: every one of the five coding tools checked here already ships a working way to reopen the previous conversation. Nothing is broken. The gap people are actually hitting is narrower, and naming it precisely is the point of this comparison.

This is the written half of a video, My LLM agents forget conversation history when I restart them, how do I fix this?, and the sections below work through the same four questions, so anyone arriving from the end card can pick up where they stopped.

More of these on our YouTube channel — the same arguments, drawn out rather than written up.

TL;DR

  • Resume exists everywhere. Claude Code, Cursor, Codex, VS Code and Windsurf all document a command or a list that reopens a previous session. If the complaint is literally "my history is gone", it is usually still on disk.
  • The real gap is the new session. Claude Code states it outright: each session begins with a fresh context window. A new task, a new terminal, a different day, and none of the five carries the earlier conversation into it.
  • Resume is not a perfect rewind either. All five document compaction. What each keeps and drops differs by design, and two of the five decline to say what is dropped at all.
  • Three of five ship cross-session memory in the editor or the CLI today, and the differences matter more than the presence: on by default in two, off by default in a third. Cursor is the fourth of the five, and the one everybody gets wrong in both directions: it shipped the feature, made it generally available, and then removed the interface for managing it with no changelog entry anywhere, and its own staff have since said both that the feature was removed and that only the interface went. At the other end, Windsurf's only remaining agent states plainly that it does not persist memories.
  • Disclosure: we build a persistent memory layer, so the last section is the one to weigh hardest. Every fact about every tool is quoted from a page that vendor published, fetched the day this article was checked, and the limit of what such a layer closes is stated as plainly as the gaps in the five.

The four questions, before any tool's name ​

Comparing "memory" across five products is meaningless until the word is split. Four questions separate cleanly, and the five answer them differently.

  1. Can you return to the same conversation? Is a resume documented, and what does using it take.
  2. What degrades even when you do resume? Every tool compacts long sessions. What each keeps is a design choice, and each states it differently, or declines to.
  3. What survives a brand new session? Not what the agent remembers, but what the tool reloads from disk regardless.
  4. Is there built-in cross-session memory? Something the agent writes for itself and reads back later, as opposed to a file a person maintains by hand.

Question one: returning to the same conversation ​

All five ship it, which is why the premise of the question does not survive contact with the documentation.

Claude Code documents five entry points, among them claude --continue for the most recent session in the current directory and claude --resume for a picker, and states what comes back: "A resumed session restores the conversation along with the state saved in it." It also names what does not come back, which is easy to miss: flags such as --mcp-config, --settings or directories added with --add-dir have to be passed again.

Cursor resumes only from its CLI, and documents three ways: "To resume the most recent conversation, use agent resume, --continue, or the /resume slash command", plus agent ls to pick from previous chats.

Codex resumes the last session or a chosen one, with its resume commands marked stable rather than experimental in its own reference.

VS Code needs no flag. Its agent sessions view restores previous sessions in the interface, and the session is the unit that persists.

Windsurf, now Devin Desktop, resumes from its CLI with short flags and from the chat history panel in the desktop app.

The practical consequence is small and useful. If what you lost was the conversation you were just in, you did not lose it; you started a new one instead of reopening that one.

Question two: what degrades even when you resume ​

Here the five stop agreeing, and a general claim would be wrong for at least three of them.

Claude Code is the only one that documents a choice rather than a silent swap. On Pro and Max plans, resuming a session idle for more than about an hour and over a hundred thousand tokens opens a dialog before your first message with three options: resume from summary, which runs a compaction immediately; resume the full session as is; or stop asking. Its documentation is unusually specific about what a compaction keeps and what it does not: the summary "replaces the verbatim conversation: full tool outputs and intermediate reasoning are gone", while the instruction file, the auto memory and up to five recently modified files are re-read from disk. Its thresholds are stated in tokens, never in percentages.

Codex compacts on command and automatically at a configurable token limit, which is unset by default and falls back to model defaults.

VS Code is explicit about the loss and silent about the trigger: compaction happens when the context window fills up, and "important details from early in a long conversation might be compressed or lost". No percentage appears anywhere in its current pages, and an earlier pair of thresholds that circulated for this tool could not be found in any of them, so they are not repeated here.

Cursor documents that every chat shares a fixed context window and that the agent compacts as it fills, but names neither a threshold nor what specifically is dropped.

Windsurf documents both an automatic background compaction and a forced one, with /compact described as "Force conversation compaction" and nothing said about what a compaction keeps.

Question three: what a brand new session still loads ​

Every one of the five reloads static instruction files from disk at the start of every session: the ones a person wrote. VS Code calls them always-on instructions, automatically included in every chat request. Cursor reads its own rules format and other tools' files as well. Windsurf's agent, now Devin Local, injects rules "into the agent's context at the start of every session".

This is real, and it is why a fresh session still knows your conventions. It is also not memory. An instruction file is a thing a person decided once. Memory is what the agent accumulated from what actually happened, and Claude Code draws the line in its own documentation: instructions you write, versus notes the agent writes itself based on your corrections and preferences.

Question four: built-in cross-session memory ​

Three of the five ship it in the editor or the CLI, and the differences matter far more than the presence: one is on by default, one is off by default, and one is experimental and on. The fourth shipped it, made it generally available, and then withdrew the interface for managing it, which no changelog records, and its own staff have since answered both ways about whether the feature behind it is still there.

Claude Code has auto memory, and it is on by default in its own words. It writes four kinds of note for itself, tagged in the file: your role and preferences, corrections you gave it, ongoing project decisions that cannot be derived from the code or git history, and pointers to where information lives outside the project. Each project gets its own memory directory, and it loads at the start of every session alongside the instruction file.

Codex has memories, and they are off until you turn them on: "Local Codex memories are off by default."

VS Code shipped a memory tool, currently in preview, with three scopes stated in a table: user memory persists across sessions and workspaces, repository memory persists across sessions but is workspace scoped, and session memory is cleared when the chat ends. All three are stored locally on your machine. The memory page itself only names the setting that switches the tool on or off, but the AI settings reference answers the question: the Memory settings table lists chat.tools.memory.enabled as experimental, describes it as enabling the memory tool "so agents can save and recall notes across conversations", and prints true in the Default column. The page is not new either: its footer stamps 9/2/2026, while the commit that added it to the public vscode-docs repository is dated 26 February 2026.

Cursor had it in the editor and no longer offers a way to manage it there, and finding that out takes a detour worth describing, because the obvious method gives the wrong answer in both directions. There is no reference page for the feature: the documentation tree has none, the addresses that would hold one 404 or redirect away, and the rules page points the persistent layer elsewhere with "Large language models don't retain memory between completions. Rules provide persistent, reusable context at the prompt level." Stopping there yields "Cursor has no memory", which is false. The feature was announced in the changelog. Version 1.0 introduced it: "With Memories, Cursor can remember facts from conversations and reference them in the future. Memories are stored per project on an individual level, and can be managed from Settings", rolled out as a beta enabled from Settings and Rules. Version 1.2 states plainly: "Memories is now GA. Since 1.0, we've improved memory generation quality, added in-editor UI polish, and introduced user approvals for background-generated memories to preserve trust." And then the interface was taken away. On 24 November 2025 a Cursor staff account answered a bug report on the company's own forum with "The Memories feature was removed starting from version 2.1.17, so it no longer appears in your current version (2.1.25)", and offered a migration: export your memories and move them into Rules. No changelog announces the removal, and the feature name appears on exactly two changelog pages, 1.0 and 1.2, and on none since. Read in that light the 404s and the redirect are not missing documentation at all, they are the trace of the removal, because rules is where the vendor told people to put what they had. The same account has since narrowed that itself. On 10 January 2026, answering somebody whose agent reported no memory tool, it wrote on the same forum: "The Memories feature hasn’t been removed. In version 2.1.x, only the UI to manage it was removed. The feature itself still works", and it pointed to chat commands for adding and deleting them. So the honest description is narrow: shipped, generally available, per project in the changelog's own words, the interface for managing it gone from the editor nine months before this was written, and the vendor itself on both sides of what became of the rest. Separately, cloud automations have their own memories, enabled by default there, scoped to one automation, and the automations page carries an honest warning that untrusted input can write misleading memories that affect later runs.

Windsurf is the surprise, and it needs its qualifier every time. Memories belong to the legacy Cascade agent, and Cascade is no longer in the product. In a warning callout at the top of that very page, quoted with the vendor's own punctuation: "Memories apply to the legacy Cascade agent only. The Devin Local agent — the default agent for new tabs — does not persist memories. Migrate the ones you rely on to skills with the Devin: Open Cascade Migration Wizard command." The limitation is listed again on Devin Local's own page, in its own words: "Memories — The Devin Local agent does not persist memories between sessions." Cognition rebranded Windsurf as Devin Desktop in June 2026 and made Devin Local the default for new tabs in late July, on 29 July, eight weeks later rather than in one event. Cascade's memory page is still published, but Cascade itself was removed in version 3.9.19 on 8 September 2026, so Devin Local is the agent Devin Desktop ships in Cascade's place, not only the default for new tabs.

Correction, 4 October 2026: this section said that Cascade's memory feature remains real and that what changed is which agent a new user meets first, and the summary and the table called Devin Local Windsurf's current default agent. Devin Desktop's changelog entry for version 3.9.19, dated 8 September 2026, says: "Cascade has been removed. Devin Local is now the only agent available in Devin Desktop." Those sentences now say so. The Devin Local page, read again on 4 October 2026, still says the agent "does not persist memories between sessions", so the answer in the table stands.

The table ​

toolresumewhat compaction dropsloaded in a new sessionbuilt-in cross-session memory
Claude Codefive documented entry points, transcripts on disktool outputs and intermediate reasoning gone; instruction file, auto memory and up to five recent files re-readinstruction files, every sessionyes, on by default, four note types, per project
CursorCLI only: resume, continue, or a session listmechanism documented, threshold and contents notrules, AGENTS.md and other tools' filescontested: GA in July 2025, the interface for managing it removed in the 2.1.x series in November 2025 per the vendor's own forum, with no changelog entry; the same account said in January 2026 that only the UI went and the feature itself still works; cloud automations have their own, on by default
Codexresume last or chosen, marked stablemanual command plus an automatic limit, unset by defaultinstruction file, rebuilt every launchyes, off by default, in its own words
VS Codesessions restore in the interfacedetail from early in the conversation may be lost, no threshold namedalways-on instruction files, automaticallyyes, experimental and on by default per the settings reference, three local scopes
Windsurf (Devin Desktop)CLI flags and a history panelforced and background compaction, contents not describedrules injected at the start of every sessionno, for Devin Local, now its only agent, stated in a warning callout

Three memories, one company name ​

One separation is worth making, because it is where most of the confusion arrives from. In late August 2026 Anthropic unified memory between its chat product and Cowork. That announcement is about the assistant applications, and it is precise about defaults: memory is on by default on Free, Pro and Max plans across web, desktop and mobile, saving sensitive topics is off by default, and on Team and Enterprise an admin controls availability while it stays off for individual users until they turn it on.

The body of that announcement does not mention the coding tool or the API at all. So enabling memory in the chat app changes nothing about the agent in your terminal, and the auto memory in the coding tool is a different feature with a different scope. Same company, same word, two mechanisms. Checking which one you turned on takes a minute and saves an argument.

Where a persistent memory layer closes the gap, and where it does not ​

Resume is a client feature. A memory layer neither replaces nor competes with it: with or without one connected, the resume command behaves the same.

What a layer adds is exactly the gap in question three. A fact written once comes back in any later session, including a brand new one, on another day, and in a different tool entirely, because it lives outside the session rather than inside it.

Two honest limits belong here, stated as plainly as anything above.

The first is that this depends on the agent actually calling the write and the read. A tool being available is not the same as a model choosing to use it, which is why the standing-instruction technique exists at all and why it is documented rather than assumed.

The second is that Claude Code's auto memory is a genuine close relative of the same idea, on by default, and saying otherwise would be false. The difference is scope: that directory is one tool and one project's worth of notes, while a memory layer follows one account across every connected tool. That is a real difference, and it is not a claim that their feature is worse.

A five-minute check on your own setup ​

Run this before concluding anything about your own tools, because the answers differ per tool and change month to month.

Open the tool you use most and resume yesterday's session rather than starting a new one. Then start a genuinely new session and ask it something only the earlier conversation could answer. If the new session knows it, cross-session memory is on; if it knows your conventions but not the conversation, what you have is the instruction file doing its job. Then check whether your tool's memory feature is enabled, which is not the default in one of the five and no longer exists in the editor in another. Finally, if you work across two tools, ask the second one the same question, because that boundary is the one none of the five crosses on its own.


Every claim about the five tools is quoted from a page that vendor published, fetched live 2026-09-04 with full browser headers, one research pass per tool, with the corrections noted below re-checked at their sources on 2026-09-06. Four of the five moved their documentation domains recently and VS Code moved its paths, so the addresses used here are the current canonical ones: code.claude.com, learn.chatgpt.com, cursor.com/docs, code.visualstudio.com/docs/agents and docs.devin.ai. One method note, because it changed two of the claims here after first publication. A sweep of a vendor's documentation tree is not a sweep of its documentation: Cursor's editor memories were announced in its changelog and never had a reference page, so a tree sweep reports the feature as absent, and VS Code answers the default-state question on its settings reference rather than on its memory page. That correction then produced a third error of its own, recorded here rather than quietly fixed: reading the changelog and stopping there says the feature is current and managed from Settings, and the Settings half of that is no longer true. A vendor's support forum is a primary source as well, and Cursor's staff address what happened there and nowhere else, in replies that do not agree with one another: the November 2025 ones say the feature was removed, the January 2026 one says only its interface was. Both were corrected against those sources: the Cursor changelog entries for 1.0 and 1.2, and the VS Code AI settings reference. Quotations keep the vendor's own punctuation, including the em dashes in the Windsurf warning on the Cascade memories page and on the Devin Local page, which is why they appear inside quotation marks in a text that otherwise uses none. Disclosure: this site publishes a persistent memory layer, and the section about what such a layer closes names its own limit rather than only the gaps in the five. No performance or benchmark number appears in this article, for any system, pending a completed clean benchmark run of our own.

Mnemoverse is a persistent-memory API for AI agents. Free key: console.mnemoverse.com · Plans and limits · Docs: Getting Started