A message that was sent and answered can be marked "Message wasn't sent — try again." The chat decides a send has settled before it knows what happened to it.
When the run stream ends, the hook that owns durable sends starts an asynchronous re-read of the session records and then reports settlement straight away, without waiting for that read. Anything still waiting at that moment is flagged as not sent. The re-read that would have cleared it lands afterwards.
The same report fires when a connection drops after the turn was accepted, even though the run may still be executing on the server.
Where it shows
- Open the agent chat and send a message on a queue-capable session.
- Delay the records read, or use a turn that finishes almost immediately, so the stream ends before the saved row is adopted.
- The message is answered, and the failure note appears under it anyway.
Reachable in a browser with the records read held back about 25 s. It was reached that way during the QA for #6658 before that PR gated settlement on acceptance; the gating narrowed the window rather than closing it.
What to do
Follow-up from #6658. Related: #6696, #6697.
A message that was sent and answered can be marked "Message wasn't sent — try again." The chat decides a send has settled before it knows what happened to it.
When the run stream ends, the hook that owns durable sends starts an asynchronous re-read of the session records and then reports settlement straight away, without waiting for that read. Anything still waiting at that moment is flagged as not sent. The re-read that would have cleared it lands afterwards.
The same report fires when a connection drops after the turn was accepted, even though the run may still be executing on the server.
Where it shows
Reachable in a browser with the records read held back about 25 s. It was reached that way during the QA for #6658 before that PR gated settlement on acceptance; the gating narrowed the window rather than closing it.
What to do
Follow-up from #6658. Related: #6696, #6697.