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: prevent queued message amnesia by flushing partial before tool-call-end
When a queued message is sent after tool-call-end, the model needs to see
the complete assistant response including tool results. Previously, there
was a race condition where tool-call-end was emitted before the partial
file was written, causing commitToHistory to read stale data.
The fix ensures partial.json is flushed to disk BEFORE emitting the
tool-call-end event, so listeners (like sendQueuedMessages) see the
complete tool result when they read via commitToHistory.
Changes:
- Make completeToolCall async
- Await flushPartialWrite before emitting tool-call-end
- Update callers to await the async method
_Generated with `mux`_
0 commit comments