Improve message reconciliation - #231
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 22791f0. Configure here.
a86df21 to
ae071f1
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
51f7119 to
2334e71
Compare
PR SummaryMedium Risk Overview Incoming agent events (streaming parts, full responses, corrections) are merged through a new The widget shows a typing cursor on non-final bubbles; Reviewed by Cursor Bugbot for commit 2334e71. Bugbot is set up for automated code reviews on this repo. Configure here. |

Summary
Turns out that event_id is not a unique ID - there can be multiple agent responses with the same event_id (e.g. if theres agent utterance, tool call and another agent utterance in the same turn). So we didn't have a good way to match streamed events. Recently we added responseId in the backend as unique identifiers of agent utterances, so we can match them properly, which is the focus of this PR:
response_id(one turn can produce several agent messages).messageswithchatHistory: a mixed, stable list of messages and tool calls, that can be extended with other types of entries in the future.Test plan