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
Fix reconnect placing response before latest user message
When reconnecting to a service, runReconnectLoop was using
messages.last(where: .assistant) which could find an assistant message
from a *previous* exchange and write the new response into it — placing
it before the most recent user message.
Fix: only reuse an existing assistant message if it's already at the
tail of the messages array. Since each user message gets a fresh service,
if the last message is a user message a new assistant message must always
be created after it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments