Skip to content

Recall can return the same text twice and drop a distinct match at the window limit #460

Closed

Description

@WhollyMindless

On main bd419e36778c3203d29ee98f1b534401ee56a57d, I reproduced an exact duplicate consuming two of three result slots in memory_recall. A distinct matching row then drops out. This is a follow-up to #450.

Reproducer. In an empty store, seed six settled learning rows in scope release in the order below, one second apart. Both B entries have identical text and distinct timestamps.

A = release checklist covers packaging signing testing auditing deployment monitoring alerts backups metrics tracing documentation
B = A with " staging" appended
D = A with "documentation" replaced by "rollbacks"
P = release printer driver requires manual installation
Q = release calendar meeting uses the shared agenda
Seed order = A, B, D, B, P, Q

Call memory_recall with {"query":"release","limit":3}. With default settings I got B, B, P. With OPENCODE_MEMORY_AMBIGUOUS=0 the same call returned B, P, Q. Both runs found all six matches before windowing. I ran this through the recall tool harness on Windows with Bun 1.4.4.

In src/recall/dedupe.ts, the newer B reaches a substitution clash with D before it reaches the identical B already in the window. The existing duplicate regression covers an additive clash in that earlier position.

Acceptance test. With grouping enabled, this fixture returns one B, P and Q. The same fixture continues to return B, P and Q with grouping disabled.

Activity

  1. added
    bug
    retrieval
    severity:high
    on Nov 20, 2026
  2. added
    fix:pr-open
    on Nov 21, 2026
  3. abogartz-opencode-self-improvement commented on Nov 21, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.33.8 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

    bugfix:pr-openreleasedretrievalseverity:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions