← Back to blog

Why your AI forgets everything (and how Wyrm fixes it)

You just spent 20 minutes explaining your codebase to an AI. Tomorrow, it won't remember any of it. Here's why, and the protocol that solves it.

Engineering9 min readBy Ryan SebastianUpdated

The amnesia problem

Every developer who uses AI coding assistants has experienced this: you spend the first 10 to 20 minutes of every session re-explaining your project. The folder structure. The naming conventions. The architectural decisions you made last week. The bug you fixed yesterday.

Then the AI hits its context window limit and starts hallucinating. It forgets the first files you showed it. It contradicts advice it gave you five messages ago. You close the session, and tomorrow? Clean slate. Total amnesia.

This isn't a bug in Claude or GPT. It's a fundamental limitation of how large language models work. Every AI conversation is stateless. There is no built-in mechanism for persisting knowledge between sessions, and context windows, even the largest ones, have hard limits.

The best AI coding assistant in the world is useless if it can't remember what you told it yesterday.

Why context windows aren't enough

Context windows now run to hundreds of thousands of tokens, and to a million on some models. Sounds like a lot, right? It's not.

A medium-sized codebase, say, a Next.js application with 50 files, can easily consume 80,000 to 120,000 tokens just to load the relevant source code. Add documentation, test files, configuration, and conversation history, and you're already at the limit before you've asked your first question.

Worse, context windows are session-scoped. Even if you could fit your entire codebase into the window, that context evaporates when the session ends. The next conversation starts from zero.

The context problem in numbers

  • 200K tokens → ~150K words → sounds massive
  • 50-file codebase → 80K to 120K tokens → half the window gone
  • Conversation history → grows 2K to 5K tokens per exchange
  • Session end → 100% of context lost. Every time.

What developers actually need: persistent memory

The solution isn't bigger context windows. It's an external memory layer that persists between sessions and serves the right context at the right time.

Think about how your own memory works. You don't load your entire life into working memory every morning. You remember the project you're working on, the bug you were debugging, the decision you made about the database schema. When you need deeper context, you look it up, in docs, in git history, in your notes.

AI needs the same thing: a persistent store of project knowledge, architectural decisions, bug patterns, and session history, with intelligent retrieval that loads only what's relevant to the current task.

Enter MCP: the Model Context Protocol

The Model Context Protocol (MCP) is an open standard that lets AI models connect to external data sources and tools. Think of it as a USB port for AI: it defines how models can read from and write to external systems in a standardized way.

MCP is already supported by Claude Desktop, VS Code Copilot, Cursor, Windsurf, Zed, and Continue, with more clients adding support monthly. It's rapidly becoming the standard for AI tool integration.

The key insight: MCP lets you build an external memory server that any AI client can connect to. The AI doesn't need to remember everything. It just needs to know how to ask for what it needs.

How MCP works

  1. AI client connects to MCP server via stdio or HTTP
  2. Server exposes tools (functions the AI can call)
  3. AI calls tools to read/write persistent memory
  4. Memory persists across sessions, clients, and projects

What an MCP memory server looks like

Setting one up takes two commands. For Wyrm, as its README gives them:

npm install -g wyrm-mcp
wyrm-setup

wyrm-setup wires Wyrm into the AI clients on your machine; restart them afterwards. To add it by hand instead, the entry in your client's MCP config is:

{
  "mcpServers": {
    "wyrm": {
      "command": "wyrm-mcp"
    }
  }
}

Then ask your client to call wyrm_capabilities to confirm the connection. From there the agent works in a loop of four steps: prime (load the project's truths, open work and dead-ends when a session starts), recall (look up what is already known before re-deriving it), check (before retrying an approach, ask whether it already failed) and capture (store durable facts, lessons and tasks as it goes). Once the habit sets in, the agent runs the loop on its own, without you pasting anything.

How Wyrm solves this

Wyrm is the memory server for AI coding agents that we build at Ghost Protocol. It keeps a project's decisions, conventions, open work and dead-ends in a single SQLite file on your own machine, and hands them back to the model at the start of the next session. By default no memory data leaves your machine.

What makes it more than a store:

  • It remembers what failed, not just what worked. The agent records a failed approach with wyrm_failure_record, and a later wyrm_failure_check surfaces it before the agent walks back into it.
  • Recall finds things by meaning as well as by keyword. wyrm_recall fuses full-text search with semantic search over a local vector index, then reranks. A small embedding model downloads the first time you run wyrm-setup, with no account and no hosted call.
  • Every write leaves a receipt: stored, queued for review, merged or dropped, and why. You can check what the agent actually committed to memory instead of trusting that it did.
  • One memory behind every client. Wyrm speaks the Model Context Protocol, so Claude, Cursor, GitHub Copilot, Windsurf and Codex use the same store without glue code.
  • Untrusted input stays out of the brief. Every memory carries where it came from, and content from an untrusted source is withheld from the context the model reads.

The idea we built Wyrm around: memory is more than storage. A dead-end recorded in one session should stop the same mistake in the next one, whichever client you are in.

The compounding effect

Without persistent memory, every AI session starts at zero. With it, every session builds on the ones before it.

Without persistent memoryWith persistent memory
Session ramp-up10 to 20 minutes re-explainingThe project's context loaded when the session starts
Repeated mistakesThe same dead-end tried againA recorded failure surfaced before the repeat
Architecture driftDecisions re-argued every weekDecisions recalled instead of re-derived

Who benefits most

Solo developers juggling multiple projects

Each project keeps its own memory, so switching between them stops meaning a fresh explanation of each codebase.

Teams with shared codebases

With the Team plan's shared team memory, one developer's dead-end warns the rest of the team before they repeat it.

Agencies managing client projects

Each client project keeps its own memory, and local use has no limit on the number of projects.

Getting started

Setting up Wyrm takes about a minute, on Node.js 22 or newer:

  1. Install it: npm install -g wyrm-mcp
  2. Wire it into your AI clients: wyrm-setup, then restart them
  3. Confirm the connection: ask your client to call wyrm_capabilities
  4. Work as usual: the agent primes, recalls, checks and captures as it goes

The bottom line

The current generation of AI coding assistants is incredibly powerful, but crippled by amnesia. Every session starts from zero. Context is expensive, fragile, and ephemeral.

MCP and persistent memory systems like Wyrm change the equation. Instead of AI that forgets, you get AI that learns. Instead of repeating yourself every morning, you pick up where you left off. Instead of knowledge that evaporates, you get knowledge that compounds.

Give your AI a memory

Wyrm is on npm as wyrm-mcp, free to use on your own machine. Install it, run wyrm-setup, and stop repeating yourself to machines.

Get the next one

New writing on security engineering and AI memory, from work we actually did. How we handle your email.