OpenCode and Claude-Mem: persistent memory setup

Learn how Claude-Mem adds project memory to OpenCode, with Node 20+ requirements, local SQLite storage, and layered retrieval for token savings.

Player not loading? Watch on YouTube

The video explains how Claude-Mem adds persistent project memory to OpenCode, an open source terminal coding assistant. The speaker describes capturing file access, edits and commands, compressing those observations into summaries, and retrieving relevant history when another session starts.

Memory lives in a local SQLite database with a vector search index. Retrieval starts with IDs and short summaries, then requests a surrounding timeline or full records when needed. The speaker attributes roughly tenfold token savings to the makers, compared with loading full records upfront; the video does not present a measured benchmark.

The setup walkthrough requires Node 20 or higher and an existing OpenCode installation. It describes an installer option targeting OpenCode, automatic installation of missing Bun and UV runtimes, and a local browser dashboard. A fresh installation has no memories, so the proposed benefits depend on subsequent work in the project.

The speaker also covers MCP search tools, private tags that exclude sensitive content from storage, and an experimental endless mode in the beta channel. Local storage alone does not establish that every configured model runs offline. The closing caution is practical: saved mistakes can influence later sessions, so the speaker recommends pausing capture for throwaway work and removing unhelpful memories.