Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Keep the continuation snapshot of a several-deliverables run even when no tool succeeded

Claudea3023218e6b5
diff --git a/src/chrome/src/agent/agent.js b/src/chrome/src/agent/agent.js
index bce2f5347..3df9b3793 100644
--- a/src/chrome/src/agent/agent.js
+++ b/src/chrome/src/agent/agent.js
@@ -40636,6 +40636,8 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
if (guard?.enabled && !guard.taskDrifted && (
hasRecipientAuthorization
|| guard.socialPublication?.contract?.status === 'ready'
+ || guard.multipleDeliverables === true
+ || (guard.deliverables || []).length > 1
|| guard.successfulTaskToolCalls > 0
|| guard.successfulConsequentialToolCalls > 0
|| guard.pendingDownloadIds.length > 0
diff --git a/src/firefox/src/agent/agent.js b/src/firefox/src/agent/agent.js
index 5f0307043..e9f8a1e0f 100644
--- a/src/firefox/src/agent/agent.js
+++ b/src/firefox/src/agent/agent.js
@@ -37378,6 +37378,8 @@ Rules: no prose intro, no conclusion, no "this screenshot shows...", no layout d
if (guard?.enabled && !guard.taskDrifted && (
hasRecipientAuthorization
|| guard.socialPublication?.contract?.status === 'ready'
+ || guard.multipleDeliverables === true
+ || (guard.deliverables || []).length > 1
|| guard.successfulTaskToolCalls > 0
|| guard.successfulConsequentialToolCalls > 0
|| guard.pendingDownloadIds.length > 0
diff --git a/test/post-submit-model-recovery.mjs b/test/post-submit-model-recovery.mjs
index e7c8ab3c5..bb0e5d903 100644
--- a/test/post-submit-model-recovery.mjs
+++ b/test/post-submit-model-recovery.mjs
@@ -183,6 +183,17 @@ for (const browser of ['chrome', 'firefox']) {
assert.equal(f.agent._planExecutionGuards.get(f.tab).multipleDeliverables, false);
});
+ test(`${browser}: Continue keeps the several-deliverables flag after a run where no tool succeeded`, async () => {
+ const f = fixture();
+ const gate = { requestKind: 'execute', requiresStateChange: true, requiresSubmission: true };
+ f.agent._startPlanExecutionGuard(f.tab, 'act', { ...gate, deliverables: [], multipleDeliverables: true }, {});
+ // The step limit was reached after failed attempts only.
+ f.agent._storeContinuationExecutionEvidence(f.tab);
+ assert.equal(f.agent._continuationExecutionEvidence.get(f.tab)?.multipleDeliverables, true);
+ f.agent._startPlanExecutionGuard(f.tab, 'act', { ...gate, deliverables: [] }, { trustedContinuation: true });
+ assert.equal(f.agent._planExecutionGuards.get(f.tab).multipleDeliverables, true);
+ });
+
test(`${browser}: a later self-verifying action does not make the earlier submission the latest step`, async () => {
// The submission left verification debt; scheduling a follow-up then
// succeeded and proved itself. lastAction still names the submission, but