Skip to content

runner: prevent duplicate user event append on invocation retry with same invocation_id #4506

@davidahmann

Description

@davidahmann

Problem

Retrying/resuming with the same invocation_id and same user message can append duplicate user events to the session timeline. That weakens invocation idempotency and can trigger duplicate downstream effects.

Expected behavior

If the same user event for the same invocation is already persisted, retry should be a no-op for message append.

Scope (Phase 1)

  • Add duplicate-event guard before appending user message event.
  • Add runner-level regression test for repeated resume/retry with same invocation ID + message.

Acceptance criteria

  • Duplicate retry does not append a second identical user event.
  • Existing non-duplicate message append behavior remains unchanged.
  • Regression test covers repeated retry path.

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementationrequest clarification[Status] The maintainer need clarification or more information from the author

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions