The Codex Changelog
All Episodes

AgentMemory Rewrites Claude Memory for Production Agents

We break down the major v0.140.0 shift from claude-mem to a local SQLite-backed AgentMemory system, including the four-tier memory model and triple-stream retrieval with BM25, vectors, and knowledge graphs fused by RRF.

The episode also covers the three-phase migration playbook, deprecated skills, and runtime updates like isolated JS execution and better crash debugging.


Chapter 1

AgentMemory Replaces claude-mem

Ethan Park

Welcome to the show everybody! I'm Ethan Park, here with Maya, and thanks to Jellypod to help make this daily show a reality. Maya, if you are running LLM agents in production, you need to pin your dependencies right now because upstream version zero point one forty point zero completely swaps out the legacy claude-mem memory manager for a brand-new local SQLite-backed system called AgentMemory. [excited]

Maya

Wait, [gasp] they completely dropped claude-mem? That was the backbone of the entire workspace persistence layer. Why the sudden architectural shift to SQLite under the hood?

Ethan Park

It comes down to state management and structured retrieval. They've replaced that ad-hoc JSON-file approach with a strict four-tier memory consolidation engine. We're talking Working, Episodic, Semantic, and Procedural memory, all managed in a single SQLite instance. Working memory handles the active context window, Episodic tracks chronological event sequences, Semantic stores factual assertions, and Procedural holds the tool-use histories and execution flows. [matter-of-fact]

Maya

Four distinct tiers in one SQLite database. [thoughtfully] That makes sense for consistency, but how are they actually querying across those tiers without hitting massive latency spikes? If an agent has to search text, vectors, and relationships simultaneously, that's a lot of overhead.

Ethan Park

They aren't doing simple semantic lookups anymore. The new retrieval pipeline uses a triple-stream architecture. It kicks off three parallel queries: a classic lexical BM25 search for exact keywords, an enterprise-grade vector search for conceptual matches, and a Knowledge Graph query to resolve entity relationships. Then, it blends all three result sets together using Reciprocal Rank Fusion, specifically RRF with a constant k of sixty. [deliberate]

Maya

RRF with k equals sixty. [matter-of-fact] That's the classic parameter for balancing sparse and dense retrieval lists. By prioritizing items that appear near the top of all three streams—lexical, vector, and graph—they prevent the agent from getting hallucinated or irrelevant context during high-velocity tool execution.

Ethan Park

Exactly. Instead of the vector search overriding a crucial exact match, the keyword match in the BM25 stream pulls the correct entity back to the top of the pile. [warmly]

Chapter 2

Migration Playbook and Runtime Chores

Maya

Alright, so if a team has an existing codebase heavily reliant on the old memory schema, they can't just run an npm update and pray. [laughs] What is the actual playbook to transition to AgentMemory without breaking active production agents?

Ethan Park

It is a deliberate three-phase migration framework: Coexist, Switch, and Decouple. During the Coexist phase, you spin up the SQLite-backed AgentMemory side-by-side with your active claude-mem instances. You write to both but read only from claude-mem.

Maya

Dual-writing. [thoughtfully] That protects your state, but what about the actual tool definitions? The agent's system prompt expects specific tool hooks.

Ethan Park

That's where the Switch phase comes in. You rewire your primary recall skills to target the new AgentMemory APIs. But here's the catch: seven of the twelve legacy claude-mem skills are completely deprecated and discarded. You have to delegate deep structural queries to the new code-review-graph tools, rather than relying on generic text matches. [serious]

Maya

Seven out of twelve? [scoffs] That's more than half the API surface area gone overnight. Developers are going to have to refactor their system prompts heavily to remove those deprecated tool bindings. What about the underlying runtime? Did they change anything else under the hood in v0.140.0?

Ethan Park

They did. They updated the rusty_v8 engine to the latest stable release to support isolated JS execution, and they restored symbol-table archiving. That means when your agent crashes mid-transaction during a migration chore, you actually get a persistent, readable stack trace of the engine's internal memory state instead of a silent segfault. [reflective]

Maya

[sighs] Finally. No more guessing why the agent's context window collapsed during a heavy RRF query. It is a massive breaking change, but the observability wins make it hard to argue against. Thanks for joining us, and we'll see you on the next deep dive.