fix(memory): preserve retries across replacements - #1669
Draft
dcramer wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d811ea5. Configure here.
| return { memory: parseMemoryRow(row), outcome: "duplicate" }; | ||
| } | ||
| if (row.supersededAtMs === null || row.supersededById === null) break; | ||
| id = row.supersededById; |
There was a problem hiding this comment.
Expiry breaks replacement chain walk
Medium Severity
The replacement walk applies the unexpired predicate to every hop, not only the final active memory. Superseded rows can keep a past expiresAtMs, so a healthy tip is never reached. Retries then hit the new fail-closed error instead of returning that active memory.
Reviewed by Cursor Bugbot for commit d811ea5. Configure here.
dcramer
force-pushed
the
codex/1651-memory-supersession-retry
branch
from
August 23, 2026 17:42
d811ea5 to
eb11d12
Compare
dcramer
force-pushed
the
codex/1600-memory-store
branch
from
August 23, 2026 20:17
6eb1f3a to
02aa5c1
Compare
dcramer
force-pushed
the
codex/1651-memory-supersession-retry
branch
from
August 23, 2026 20:18
eb11d12 to
734d761
Compare
dcramer
force-pushed
the
codex/1600-memory-store
branch
from
August 23, 2026 20:45
02aa5c1 to
71088bf
Compare
dcramer
force-pushed
the
codex/1651-memory-supersession-retry
branch
from
August 23, 2026 20:46
734d761 to
4c48b8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Memory write retries now follow the full replacement history and return the final active memory. Broken or cyclic history fails closed, so an old preference cannot be silently created again.
The existing PostgreSQL storage scenario now covers two replacements followed by a retry of the original write key. This draft is stacked on #1651 and should merge after it.
Refs #1600