← Blog

Why Claude Code Keeps Forgetting (And How to Fix It)

· 5 min read · mVara

You spent an hour walking Claude Code through your architecture. Why the events table runs on Postgres, not SQLite. Why the worker pool caps at twelve. Why the auth flow detours through that one ugly middleware. The agent got it. It built three good commits on the back of that context.

Then compaction hit. The summary it kept was thin. The reasoning evaporated.

Next morning you opened a fresh session. The agent suggested SQLite for the events table.

You explained again.

The forgetting is structural, not a bug

Context windows are bounded. That's physics, not a roadmap item. Every coding agent in production today. Claude Code, Cursor, Windsurf, OpenCode, the new one that shipped this week, has the same ceiling. Hit it, and something has to give.

What gives is your reasoning. The summary the agent keeps after compaction is a thin gloss of the conversation. The "why" gets crushed into the "what." Decisions survive as facts without their justification. Six weeks later when the same tradeoff comes back around, the agent has no idea you already chose.

CLAUDE.md helps. A little. It's a hand-maintained text file that loads at the top of every session. Useful for project conventions. Useless for the kind of memory that actually compounds, the threaded reasoning across forty-seven sessions where the architecture took shape.

Local SQLite helps less. It lives on one machine. It doesn't follow you to the iPad. It doesn't follow the agent to the CI runner. And it still doesn't survive compaction inside a single session.

The forgetting is structural. You are the memory, and you know it. You're the one copy-pasting the same five paragraphs of context every Monday morning.

CLAUDE.md is not memory. It's a sticky note.

CLAUDE.md is fine for what it is. Project conventions. Lint rules. The names of your three favorite scripts. It loads at the top of every session and takes up the same context room every time.

It is not memory. It does not grow. It does not thread. It does not know that on March 2 you debated removing the worker pool cap and decided against it because of the connection-pool ceiling on the Postgres side. You wrote it by hand or you didn't. The agent reads it and forgets the rest.

Memory is the part the agent writes. Memory is the part that compounds.

What persistent memory actually means

Not a log file. Not a dump of the conversation. Not a transcript you grep through.

Semantic memory the agent reads and writes naturally. Threaded, a decision links to the reasoning that produced it, which links to the alternative that got rejected, which links to the bug three weeks later that vindicated the choice. Searchable by meaning, not just keyword. Survives the boundary between sessions, between compactions, between platforms.

The agent does the writing. The agent does the reading. You stop being the courier.

The agent isn't broken. It just can't remember.

Three commands. That's the whole protocol.

Geniuz gives your agent three commands. remember writes a memory with a gist that the next reader can find. recall searches what's there, semantically by default, by keyword on demand. recent shows the latest, in case you just woke up.

Here's the flow. Session 1, January 14. The agent makes a real architectural call and remembers it.

# Session 1. January 14
geniuz remember \
  -c "chose Postgres over SQLite for the events table" \
  -g "architecture: postgres over sqlite, need JSONB,
      concurrent writes, full-text search later"
  ✓ memory saved · thread root

# Session 47. March 2
geniuz recall "why did we choose postgres"
  ✓ January 14: "architecture: postgres over sqlite,
      need JSONB, concurrent writes, full-text search later"
  ✓ 47 sessions later. Zero re-explanation.

Forty-seven sessions. Two and a half months. A different machine, possibly a different model. The reasoning surfaces because the agent recalled it. Not because you remembered to paste it back in.

That's the whole pattern. Remember what matters when it's still hot. Recall when the question comes back around. The memory belongs to the agent now.

Every week there's a new coding agent. None of them ship with persistent memory.

The agent ecosystem moves faster than any single platform. Claude Code one week, Cursor the next, Antigravity the week after that. They all have the same hole. They all expect you to fill it.

Geniuz is platform-agnostic and local-first. MCP works with Claude Desktop, Claude Code, OpenClaw, Windsurf, Cursor, OpenCode, Roo Code, Antigravity. The CLI works in any shell. PicoClaw on a Raspberry Pi connects through shell skills. Switch tools tomorrow and your memory comes with you, because it lives on your machine, not in someone else's cloud.

The memory doesn't belong to the IDE. It belongs to the work.

Stop being the memory yourself

Your agent is forgetting right now. Every session it loses, you rebuild by hand.

Hand the memory to the agent. Get back to building.