You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discard can report success after the interrupted follow-up was already queued #804
Follow-up F5 from PR #779 (merged as e2a195b2296), local review round 3 (Terra finding R7). Pre-existing in the service; #779's agent tools expose it to callers.
Claim
ActionResume.ts:1358-1363: if deliverPendingUnlocked gets the follow-up message accepted by dispatch but saving delivered then fails transiently, the registry still says pending. resumeInterruptedImpl rolls it back to available and returns failure. A subsequent discard (ActionResume.ts:1380-1392) then succeeds, but it does not remove the message that was already queued.
Why declined
Pre-existing; needs a transient ledger write failure right after an accepted dispatch.
Symptom if left
An agent or user discards the interrupted follow-up (told "new Actions can launch"), but the already-queued follow-up still runs later, delivering a result the caller thought was dropped.
Suggested fix
Distinguish an accepted dispatch from a failure before acceptance before restoring available. Reconcile using the stable receipt or message identity (as deliveryAlreadyAccepted does on retry), and don't offer discard as if the queued follow-up had been dropped. Cover the accepted-dispatch / failed-ledger-write case.
Activity