// the take
OptMem is a file-based persistent memory system for LLM coding agents (Claude Code, etc.) — a single dependency-free Python script plus a short prompt block pasted into AGENTS.md/CLAUDE.md. It replaces session-scoped context with an append-only log of one-line memories backed by a rebuildable binary-tree summary cache, aimed at developers who want their agent to remember facts and decisions across sessions without standing up a vector DB or external service.
Zero external dependencies and a single Python file make it trivially auditable and easy to vendor — no API keys, no background service, nothing to run. Fixed-width records give O(1) seek-based lookups, so the claimed 0.03s wake at a million records (608MB) is a reasonable consequence of the design, not a marketing number. The split between the append-only LOG.txt (source of truth, never rewritten) and the TREE cache (derived, freely rebuildable via `forget`) means the cache can never silently corrupt the underlying memory. Integration cost is near zero — it's a markdown block in a system prompt, not an SDK or plugin, so it works with any harness that reads AGENTS.md/CLAUDE.md.
The whole mechanism depends on the model obediently calling `memo wake` first and `memo note` after anything worth remembering; there's no hook enforcing this outside the prompt, so a smaller or distracted model (or one with a long competing system prompt) will just silently stop recording memories with no error surfaced. Recall is regex-only, word-for-word search with no semantic layer, so as the log grows, finding a memory means guessing the right literal phrasing — a real regression from embedding-based memory tools for anything but exact-term lookups. No concurrency control is described for the append-only log: the prompt admits 'parallel sessions... may all write memories' but gives no locking or merge story, so simultaneous `note` calls from multiple sessions are a plausible lost-write path. It's a young, single-maintainer project (one `test.py`, no visible CI) serving as an agent's sole durable memory — losing or corrupting LOG.txt means losing everything, with no backup or export story beyond 'it's a text file, sync it yourself.'
We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →