Raw event log as agent memory

· Memory · Coding-Agents · Sqlite · Context-Engineering

What it is

Most agent memory systems compress the past as it happens: they extract facts, embed them, or summarise sessions into notes. This pattern skips all of that. Keep every session as an append-only event log in SQLite, and give the agent two tools: full-text search (FTS5) and read-only SQL. When it needs something from the past, it searches the raw record and reads the exact turns.

The argument is that any summary is a guess about what a future task will need. Searching the raw log defers that decision until the question is known.

Why it is getting attention now

Hatchery published “The bitter lesson for agent memory” on 2 December 2026 and it reached 320 points on Hacker News on 5 December. They report that the raw-log setup beat or matched specialised memory systems on five benchmarks, for example 85.7% on DolphinBench at $4.73 against 70.7% at $96.21 for Mem0, and that results improve as the model gets stronger because stronger models write better queries.

The most useful finding for practitioners: adding an after-task “dreaming” pass that writes a wiki helped smaller models (+0.227 mean reward on Sonnet 5.5, +0.134 on Haiku 5.5) but made no difference on the strongest ones (-0.011 on Opus 5.5). The post reads that as notes being a scaffold for weaker models.

It builds on Anthropic’s 6 November 2026 engineering post on the components of agent memory, and notes that Codex already keeps summaries linked to raw transcripts.

How to try it in about ten minutes

This is a home-made approximation, not Hatchery’s tooling.

  1. Claude Code keeps session transcripts as JSONL files under ~/.claude/projects/. Ask the agent to write a small script that loads them into a SQLite database with one row per event (session id, sequence number, timestamp, role, text) and an FTS5 table over the text.
  2. Add a few lines to CLAUDE.md or AGENTS.md: before starting work that might have history, search the database with sqlite3 memory.db "SELECT ... WHERE events_fts MATCH '...'", then read the surrounding turns by sequence number.
  3. Open the database read-only for the agent.
  4. Try it on a real question, such as why a past decision was made, and compare with what your current memory notes say.

The tool surface in the article is small enough to copy: list sessions, search, read a window of turns, and run read-only SQL.

Where it falls short

Sources

Changelog