From f6e7166e7955af6c06881cfecf6d869854cf191e Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Thu, 26 Feb 2026 18:43:57 -0800 Subject: [PATCH] Capture threadId before async send flow - Store `activeThread.id` once at send start and reuse it - Prevents updates/errors from targeting the wrong thread during async worktree/send steps --- apps/web/src/components/ChatView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index ea9e11ed29..2e33ceccd4 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -1466,7 +1466,7 @@ export default function ChatView({ threadId }: ChatViewProps) { // with the worktree cwd/env instead of briefly using the project root. dispatch({ type: "SET_THREAD_BRANCH", - threadId: activeThread.id, + threadId: threadIdForSend, branch: result.worktree.branch, worktreePath: result.worktree.path, });