rkb captures sessions on signals and distills only when asked, with no model of its own
Context#
Knowledge is lost at compaction and session end when nobody writes the lesson. The first plan was a scheduled job that runs a headless model over transcripts. A comparison of agent-memory designs (LangMem, Letta, mem0, Claude Code memory, Cursor, Copilot, Reflexion, ExpeL, claude-reflect, self-improving-skills, pi-llm-wiki) favored storing only what an outcome supports and reviewing before memory is used.
Decision#
At compaction and session end, the hooks save an extract of the session to the inbox only when the session had a fixed, correction or remember signal; no model runs. /rkb:retro (Claude Code) or /rkb-retro (pi, omp) and the distill command ask the agent in a session to write lessons with the normal write path. Inbox items expire after 30 days; the session-start line names the distill command only at 5 items or 7 days.
Why#
A lesson written by the agent that has the context, with the user present, is better than a summary made later, and every write still goes through lint, similar-lesson notes and confirmation. Timers and unreviewed automatic writes were the main sources of polluted memory in the designs compared.
Rejected options#
- A scheduled headless distiller: spends tokens unattended and writes unreviewed drafts.
- A reminder every N turns: ignores content, and stopping after one save rewards a token save.