Skip to content

Memory: distill procedural strategy entries from successes and failures (ReasoningBank pattern) #308

Closed

Description

@currentbits

From the memory-systems research: ReasoningBank (Google, arXiv 2509.25140, open code) shows distilling reusable STRATEGIES from both successful and failed trajectories beats fact memory (+34% relative success, -16% steps; failures carry much of the gain).

Solenta's types map as: run = episodic, knowledge = semantic, convention = closest to procedural. The gap is a true strategy type: short 'when doing X, do/don't Y' entries distilled periodically from helpful/harmful feedback evidence and failed runs (the self-judgment signal ReasoningBank uses), injected at bootstrap. Distinct from #301 (consolidation of existing entries): this creates a new abstraction layer above them.

Activity

  1. added
    enhancement
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Aug 17, 2026
  2. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Implementation split, in flight on coder/memory-distill-procedural-strategy-entri-f14749:

    1. Contract (done, 136545a) — fifth entry type strategy, ranked between convention (5) and knowledge (3). widenEntryTypes() rebuilds the entries table on existing DBs since SQLite can't ALTER a CHECK; it reuses the DB's own DDL so the later column migrations still fire. memory_bootstrap gains a strategies section (whole bodies, 500-token budget) plus a protocol line.
    2. memory_distill (grok worker) — read-only report mirroring memory_maintenance: harmful-feedback entries with their notes, abandoned tasks, recent runs, helpful entries, and the strategies already stored. The server has no LLM, so distillation is agent-driven: the report hands over the evidence and the calling agent writes the type: 'strategy' entries. Store-time dedup is what stops restatements — no new state, no watermark.
    3. App surface (grok worker) — strategy through MemoryEntryInfo, the MemoryTab badge/filter/store form, devCoder seeds, and any electron proxy allowlist. No new UI.

    Deferred: no automatic distillation schedule (the janitor stays dumb), and no server-side LLM.

  3. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Both grok workers landed; branch coder/memory-distill-procedural-strategy-entri-f14749 is complete and green (local, not pushed).

    • memory_distill returns { failures, successes, existing, instructions }, each list project-scoped, live-only, capped at 20 with the true total alongside so nothing truncates silently. Failures = harmful-feedback entries with their last 5 feedback_log notes + abandoned tasks; successes = helpful entries + runs from the last 14 days.
    • App side: strategy through MemoryEntryInfo, its own badge, the store form, and a dev seed. The electron proxy has no type allowlist, so nothing to widen there.
    • Seam the two workers each faked: a strategy stored over REST (how the Memory tab writes) must come back out of memory_bootstrap and memory_distill. Covered in test/rest.test.js.

    Tests: memory 173/173, renderer 913/913, core 38/38, electron 1159/1160 (the failure is the pre-existing wireClient × webBridge socket baseline on main).

  4. added
    plan:done
    and removed
    plan:doing
    on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions