-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
Abort (stop) does not prevent recovery-path re-delivery of partial reply #29127
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Problem
When a user sends "stop" to abort an in-progress generation, the abort signal cancels the AI run. However, the abort is handled entirely in-memory — there is no persistent record that the turn was aborted. If the gateway crashes after an abort but before cleanup completes, a recovery mechanism could re-deliver the partial reply since it has no way to know the turn was intentionally aborted.
Steps to reproduce
- Send a message that triggers a long AI generation
- Send "stop" to abort
- Kill the gateway before the abort fully completes
- Restart the gateway
Current behavior
The abort cancels the in-memory AI run, but:
- No persistent state records that this turn was aborted
- The delivery queue may still contain the partially-generated reply
- On restart, recovery logic sees a pending delivery and re-delivers it
- The user receives a partial reply they already aborted
Expected behavior
Abort should be recorded persistently so that recovery mechanisms know not to re-deliver aborted turns. A turn marked as "aborted" in a durable store should be skipped by recovery on restart.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.