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. The one exception to "no model runs" is the opt-in observer, which the user turns on and approves; it still only writes to the inbox.
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.
Also found by searching
- does rkb run a model in the background to write lessons from my sessions
- lessons get lost at compaction and session end, when does rkb save session extracts
- how does rkb decide which sessions go to the inbox and when distillation runs
- fixed correction remember signal hooks capture, distill on demand, no scheduled LLM job
- why doesn't rkb run a model automatically over transcripts to make lessons?
- when does rkb save session extracts to the inbox, compaction or session end?
- how do I turn session knowledge into lessons with rkb /rkb:retro or distill?
- rkb inbox items expire after 30 days, distill reminder at 5 items; why not a scheduled headless job