Skip to content

fix(scan): migrate stale idempotency keys - #393

Closed
acxt wants to merge 1 commit into
MemTensor:mainfrom
acxt:fix/codex-scan-idempotency
Closed

acxt wants to merge 1 commit into
MemTensor:mainfrom
acxt:fix/codex-scan-idempotency

Conversation

@acxt

@acxt acxt commented Sep 10, 2026

Copy link
Copy Markdown

Problem

Repeated Codex scans can reuse a legacy idempotency key after the request body changes. The memory service correctly rejects the mismatch, causing the desktop scan to finish with errors. Skill file mtimes can trigger the same failure even when content is unchanged.

Fix

Retry only confirmed idempotency-body mismatches with a v2 key derived from the exact add-memory payload. Other errors still fail closed. Apply the same migration behavior to the desktop backend and bundled Memory runtime.

Verification

  • Backend agent-source service: 44 tests passed
  • Backend TypeScript typecheck passed
  • Memory TypeScript typecheck passed
  • Memory agent-source runtime: 17 tests passed

@acxt

acxt commented Sep 10, 2026

Copy link
Copy Markdown
Author

Closing at the request of the reporter; we are validating the built-in recovery path before proposing a source change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant