diff --git a/frontend/app/components/assistant-ui/thread.tsx b/frontend/app/components/assistant-ui/thread.tsx index 47511c2..32ba6db 100644 --- a/frontend/app/components/assistant-ui/thread.tsx +++ b/frontend/app/components/assistant-ui/thread.tsx @@ -384,12 +384,13 @@ function useJupyterWorkspaceStatus(sessionId: string | null) { setStatus(null); return; } + const sessionIdForRequest = sessionId; let cancelled = false; async function refresh() { try { const response = await fetch( - `/api/claw/jupyter?session_id=${encodeURIComponent(sessionId)}`, + `/api/claw/jupyter?session_id=${encodeURIComponent(sessionIdForRequest)}`, { cache: "no-store" }, ); const payload = (await response.json().catch(() => ({}))) as