I built a local-first memory service so my coding agent stops forgetting between sessions
Description and use
The memnest service consolidates memory across multiple LLM harnesses, enabling prompt-time recall and reducing repetitive work. It achieves high recall@1 (0.976) on benchmark queries and operates entirely locally without external LLM calls.
Problem
A coding agent lost context between sessions, requiring the user to re-enter information such as port numbers, crate choices, and race condition fixes each time.
Outcome
The memnest service consolidates memory across multiple LLM harnesses, enabling prompt-time recall and reducing repetitive work. It achieves high recall@1 (0.976) on benchmark queries and operates entirely locally without external LLM calls.
Workflow
- 1. Install memnest via the provided install script or build from source.
- 2. Start the memnest service (it downloads the embedding model on first use).
- 3. Configure each harness to use memnest: for pi, register the extension; for Claude Code and Codex, add a memnest hook on UserPromptSubmit; for other MCP clients, point mcpServers to http://127.0.0.1:3111/mcp.
- 4. Use memnest watch to capture transcripts automatically.
- 5. When prompting the agent, memnest provides prompt-time recall via autocontext or hooks, returning relevant memories.
- 6. The agent can now access shared memory across sessions without re-entering information.
- Record date: 2026-09-09T01:15:22.659Z