Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
Keep the reconnect follower shape that the protocol checks expect
Claude54fe07391849
diff --git a/src/chrome/src/ui/sidepanel.js b/src/chrome/src/ui/sidepanel.jsindex 615c8bcb9..ca60a8461 100644--- a/src/chrome/src/ui/sidepanel.js+++ b/src/chrome/src/ui/sidepanel.js@@ -14219,12 +14219,15 @@ async function sendRunWithReconnect(initialAction, payload, recoveryOptions = {}});const follower = { requestId, promise };localRunFollowers.set(tabId, follower);+ // Without a reconnect the run's own inbox returned whatever it left+ // unapplied. This reaction is registered first, so it runs before the+ // awaiting code below resumes.let backgroundInterrupted = true;- try {- const result = await promise;- // Without a reconnect the run's own inbox returned whatever it left unapplied.+ promise.then(result => {backgroundInterrupted = result?.reconnected === true || result?.resumed === true;- return result;+ }, () => {});+ try {+ return await promise;} finally {if (localRunFollowers.get(tabId) === follower) localRunFollowers.delete(tabId);if (backgroundInterrupted && shouldContinueRunRecovery()) await reclaimUnappliedSteering(tabId);diff --git a/src/firefox/src/ui/sidepanel.js b/src/firefox/src/ui/sidepanel.jsindex 24e13e51f..7606c137a 100644--- a/src/firefox/src/ui/sidepanel.js+++ b/src/firefox/src/ui/sidepanel.js@@ -13845,12 +13845,15 @@ async function sendRunWithReconnect(initialAction, payload, recoveryOptions = {}});const follower = { requestId, promise };localRunFollowers.set(tabId, follower);+ // Without a reconnect the run's own inbox returned whatever it left+ // unapplied. This reaction is registered first, so it runs before the+ // awaiting code below resumes.let backgroundInterrupted = true;- try {- const result = await promise;- // Without a reconnect the run's own inbox returned whatever it left unapplied.+ promise.then(result => {backgroundInterrupted = result?.reconnected === true || result?.resumed === true;- return result;+ }, () => {});+ try {+ return await promise;} finally {if (localRunFollowers.get(tabId) === follower) localRunFollowers.delete(tabId);if (backgroundInterrupted && shouldContinueRunRecovery()) await reclaimUnappliedSteering(tabId);