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
Add Lock + Confirm/Cancel semantics to MessageQueue
Add Confirm and Cancel methods to the MessageQueue interface so that
persistent queue implementations can use a transactional dequeue pattern:
Dequeue locks a message (in-flight), Confirm permanently removes it
after sess.AddMessage succeeds, Cancel releases it back to the queue
on failure.
This prevents message loss when the process crashes or the context is
cancelled between dequeue and session persistence. The in-memory
implementation treats Confirm/Cancel as no-ops since the message is
already consumed from the channel on Dequeue.
The agent loop now calls Confirm after successfully adding a follow-up
message to the session. Drain (used for steer messages) auto-confirms
all messages in a batch.
0 commit comments