Skip to content

Add safe browser control handoff for Cloud runs - #3182

Merged
esokullu merged 3 commits into
mainfrom
codex/run-browser-handoff-v40
Oct 12, 2026
Merged

esokullu merged 3 commits into
mainfrom
codex/run-browser-handoff-v40

Conversation

@esokullu

@esokullu esokullu commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Cloud tasks can now pause at a settled tool boundary, give the user browser control, and resume the same run after a fresh page observation. Queued actions based on the previous page are discarded; task authorization, pending sends, and mutation receipts remain intact. A worker restart preserves manual ownership and requires explicit reconciliation instead of replaying the task.

Updated this branch with current main (0010c7fda) and retained version 40.4.1 in both browser builds.

Review fixes

  • Reserve Cloud startup before asynchronous setup and reject takeover while another Cloud or native agent owns the browser; block new agents throughout handoff.
  • Hydrate persisted ownership before scheduled/sidebar starts, fail closed on storage read errors, and retain older active handoffs ahead of completed history.
  • Wait for durable storage before returning duplicate pause acknowledgements.
  • Acknowledge clarification waits only for the native standalone clarify tool; internal form/permission approvals must settle first.
  • Preserve cancellation when late clarification updates arrive.
  • Include handoff regressions in the normal Cloud test suite and verify approved bridge command dispatch in Chrome and Firefox.

Validation

  • npm run test:cloud-bridge-approval: 193 passed, including 28 handoff tests.
  • npm run test:failure-recovery: 114 passed.
  • Native lifecycle, startup, deadlines, and pending-chat reconciliation: 293 passed.
  • test/integration-races.mjs: 26 passed after fixing the cancellation regression.
  • npm run build:all: Chrome and Firefox build successfully at 40.4.1.

The broader runtime shard also exposed two existing failing cases on unchanged main: direct/wrapped empty-caret expectations in test/draftjs-text.mjs, and an undeclared direct fixture variable in test/runtime-lifecycle.mjs. Both were reproduced in a separate checkout of 0010c7fda; their production code and tests are outside this change. The final runtime shard completed with 4,473 passed / 4 failures (the two empty-caret subtests, their parent test, and the deletion fixture), matching the failures reproduced on main. The branch cancellation regressions no longer fail.

  • Local npm run test:pdf-mime-handler and npm run test:webmcp smoke checks both pass with Chrome 154.0.8037.97.
  • GitHub Actions WebMCP and CodeQL jobs did not start: GitHub reports that the account is locked due to a billing issue. The WebMCP/PDF checks were run locally; no claim is made that CodeQL ran.
  • Final review checked head 10c377dfcd82b09de996ae0ee89cf9c6b7511f00 against main 0010c7fda3e9a3c9960d823204874b2fe23199a7; no outstanding PR review comments.

@vercel

vercel Bot commented Oct 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webbrain Ready Ready Preview Oct 12, 2026 11:28pm UTC

Request Review

@esokullu
esokullu merged commit d44832c into main Oct 12, 2026
2 of 6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 10c377df Deployed Oct 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant