From b03cb5379576b16cfdb8d0f613cf470aaec5ab70 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Tue, 7 Jul 2026 12:06:48 -0700 Subject: [PATCH] [eric] browser: send-script receipt=False must NOT set send_confirmed (r264 set it unconditionally, so an unverified send let the model FALSELY claim delivery); only a cleared-composer receipt confirms --- backend/apps/agents/browser/browser_agent.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/apps/agents/browser/browser_agent.py b/backend/apps/agents/browser/browser_agent.py index 6674f4a6..72e7352a 100644 --- a/backend/apps/agents/browser/browser_agent.py +++ b/backend/apps/agents/browser/browser_agent.py @@ -1229,13 +1229,14 @@ async def run_browser_agent( p_script = None if isinstance(p_script, dict): action_log.extend(p_script["log"]) - send_confirmed = True if p_script["sent"]: + # receipt verified (composer cleared): the send is DONE, end the run + send_confirmed = True done_called = True done_success = True done_message = f'Sent "{p_script["payload"]}", the send registered and the composer cleared.' else: - # clicked but unverified: the model gets ONE truthful verify pass, never a blind resend + # Clicked but the composer did NOT clear: the send is UNVERIFIED. Leave send_confirmed False so the loop can't shortcut to a "done" it never earned (r264 set it True here and the model then FALSELY claimed delivery). The model gets ONE truthful verify pass, never a blind resend. task = f"{task}\n\n[{p_script['note']}]" try: