Agents have Amnesia. I Gave It a RocksDB.

A shared, durable, cross-session memory in about 300 lines — and an honest look at where RocksDB is the wrong tool. TL;DR Coding agents start every session from zero. The usual fix — a hand-maintained static CLAUDE.md or rules file. RocksDB is a good fit for agent memory: ordered keys make prefix scans your query language, column families give you tiered retention, and LSM storage suits a write-heavy event log. It has one constraint that nearly disqualifies it: exactly one read-write process per database, and the lock fails immediately rather than waiting. The fix is architectural, not clever. Let the MCP server own the database handle. It's already a single long-lived process that many
…