I'm still seeing duplicate messages in 1.2.0. Expe...
# proj-agent-canvas
w
I'm still seeing duplicate messages in 1.2.0. Expected?
h
Not expected sadblob
Any details on that conversation you could share?
w
It's in every conversation
it should be easy to repro
actually...
ok I think this was a convo created before the update
new convos seem to be working!
🎉 1
m
Which model? I also remarked that different API have different streaming and sometime there are corner cases which are difficult to catch.
w
This was Opus. I think you can ignore this unless I manage to repro with a new convo 🙂
m
FYI: I just did a quick audit of
agent-server
and the streaming part in
agent-canvas
, and I found a couple of potential bugs: • github.com/OpenHands/agent-canvas/issues/1656 • github.com/OpenHands/software-agent-sdk/issues/4077 I couldn't reproduce every issue, but I went ahead and opened them so we don't forget about them.
🙌 2
🙏 2
w
OK I am indeed still getting some duplicate messages in 1.2.0, with fresh conversations
unclear how to repro
or what conditions cause it
c
@bland-bear-604 I have also seen a couple of random conversations in our agent-canvas, which had the first agent message duplicated, or, like, the first ~4 agent messages contained duplicate or almost duplicate messages. Please look at the first ~10 events for every convo, are there dupes in events? or were they a visual fluke? can we repro?
👀 1
b
I checked all 27 local Canvas conversations. Across the first 10 persisted events in each (221 events total), there are no duplicate IDs or duplicate payloads, and I found no duplicate pairs among the first 10 assistant messages. Two old greeting conversations contain two similar greetings inside one `MessageEvent`; that is model output, not duplicated events. I can reproduce the UI bug on current main: a streamed
\nHello world
followed by the final
Hello world
leaves both entries in
handleEventForUI
, so Canvas renders two bubbles. Streaming deltas are not persisted, which explains why the files look clean. This matches agent-canvas#1656 and software-agent-sdk#4077. The fresh-conversation reports are probably real, but transient rather than duplicate persisted events.
c
Tell us the titles of those issues you found, and their links. Be nice and create a Slack link, with text and address y’know
c
From the first, please fix this section: 3. MEDIUM — Assistant message rendered twice when the final text isn't a clean prefix of the streamed deltas
👀 1
Aha, these were exactly those that Vasco mentioned!
b
Fixed section 3 in draft PR #1695: render canonical final assistant message once. If streamed text differs from the final message, Canvas now drops the stale streamed text and renders the final event. Leading/trailing whitespace is reconciled, and stream-only reasoning is preserved. The focused tests, full suite, typecheck, and build pass.