skillmem: open-source procedural memory for MCP agents, with hard-won recursion lessons
mrPetrukovich · reddit · 2026-09-16
Author open-sourced skillmem (Apache-2.0): an MCP server plus hooks that gives Claude Code, Codex CLI, Cursor, Windsurf, Gemini CLI and opencode a shared SQLite memory of how tasks were solved (trigger, steps, outcome, lessons) rather than facts. Frequently useful skills strengthen; unused ones decay and get archived. Local ONNX embedding, no API key, no cloud.
Two pitfalls worth knowing:
- Hook recursion: a Stop hook asking the agent to summarize spawns a child session that fires the same hook — 4,083 summary sessions and 1GB of transcripts in one day. Only an env flag checked by the hook itself stops it.
- Agent-written memory is not a user rule: external text can be distilled into notes that return next session under a heading that reads like the user's own rules. Every record now carries provenance; only the owner can promote one to a rule, unapproved content is injected in a clearly marked data block, and the summarizer runs with no tools.
Retrieval is measured: hit@5 0.871 / MRR 0.622 on the full LongMemEval set, hybrid retrieval, CPU-only, reproducible with one command.
More from coding & agent
- The coordination tax: why parallel multi-agent lanes burn tokens on excessive verification — pvncher · 2026-09-16
- Telling your coding agent to slow down actually helps, developer reports — nilogram · 2026-09-16
- The Hacker's Guide to Attacking AI Agents: a systematic look at agent attack surfaces — _clickfix_ · 2026-09-16
- vAIvar: open-source honeypot feeds attacking AI agents endless hallucinations — Scobleizer · 2026-09-16
- Polyphonic details: auto-imported skill libraries, tag-a-into-chat agents, early Mnemos memory system — RileyRalmuto · 2026-09-16
- Polyphonic beta: a Mac 'home' where Claude Code, Codex and other agents share memory and collaborate — RileyRalmuto · 2026-09-16