mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 00:02:30 +00:00
Three separate holes, all in code this PR added. `endTurn` cleared every flag but `isDispatchingTurn`, so Stop could not release the hold a failed transcript load leaves behind. That flag gates the whole surface, so a conversation whose rows never load took New chat and every other chat with it. The route component is reused between two flows, so the chat is re-pointed rather than rebuilt, and `cleanup()` only ended turns. The selection survived, so `selectLatestConversation` found one already open and the new flow rendered — and would have sent into — the previous flow's conversation and agent memory. Cleanup now forgets what it holds about a flow. Two `delete_jobs` calls each removing one of a conversation's last messages could not see each other's uncommitted deletes, so neither collected the conversation and nothing tried again, stranding the row and its `ai_agent_memory`. The conversation rows are taken before the emptiness check, which serialises them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>