Skip to content

fix(desktop): stop the blank initialize load from aborting browser.open_url - #4331

Merged
reachjalil merged 1 commit into
devfrom
fix/browser-open-url-marker-abort
Sep 2, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/browser-open-url-marker-abort

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Problem

Since #4207 started loading about:blank on every new built-in browser tab (to preempt persistent-session restore), the agent-facing browser.open_url action has rejected every request with:

Error invoking remote method 'openwork:browser:openUrl': Error: ERR_ABORTED (-3) loading 'about:blank'

openBrowserUrlForAutomation creates the tab and immediately awaits the CDP marker-page load. The blank initialize load is queued as a detached task, so it starts after the marker load and aborts it; Electron's loadURL promise rejects with the aborting navigation's URL, the IPC call fails, and the tool never returns a target or opens the page. Every agent browser session that begins with browser.open_url has been failing on dev for a week.

Reproduced on clean dev@e0ce31da9: the spec added here fails there with exactly that error (pnpm evals:e2e browser-open-url-returns-target, exit 1, 0 passed / 1 failed).

Change

  • createBrowserTab(url, { select, initializeBlank = true }): callers that load their own page synchronously can opt out of the blank initialize load.
  • openBrowserUrlForAutomation passes initializeBlank: false. The marker page it loads right away already preempts session restore, so nothing is lost.
  • Every other tab-creation path keeps the blank load unchanged; their first navigation is queued the same way, so it was never aborted.

Verification

Runtime proof — evals/specs/browser-open-url-returns-target.e2e.test.ts, mapped to a new desktop.builtin-browser contract (browser-panel.mjs, browser-content-preload.cjs). It drives the real control action against the desktop's own local server page (/health, no token, loopback), so nothing depends on the public internet. Claims: the action resolves with a built-in handle; the tab loads the requested page; the returned CDP target answers Runtime.evaluate for that page; a second request opens a second, independent tab.

Daytona lane, exact head 08e83debf:

OPENWORK_EVAL_DAYTONA=1 OPENWORK_EVAL_DAYTONA_SANDBOX=<sandbox> OPENWORK_EVAL_E2E_TESTS=1 pnpm evals:e2e browser-open-url-returns-target
exit 0 · 1 passed, 0 failed, 0 skipped · 4/4 assertion claims (published below)

Negative control, identical spec on clean dev@e0ce31da9, local: exit 1, ERR_ABORTED (-3) loading 'about:blank'. The spec also passes locally on this branch (1/0/0).

Also green on this head:

pnpm --filter @openwork/desktop test              294 pass, 0 fail, 1 skipped (pre-existing)
pnpm evals:pr specs/daytona-e2e-singles-toolchain.test.ts specs/daytona-e2e-regression-{concurrency,schedule}.test.ts   8 pass
pnpm --dir evals run lint:layers                  no violations
node evals/scripts/spec-impact.mjs                desktop.builtin-browser covered by the changed E2E test

Verdict: Passed.

Related

…en_url

Since the built-in browser started loading about:blank on tab creation to
preempt persistent-session restore, the agent-facing `browser.open_url`
action has rejected every request with `ERR_ABORTED (-3) loading
'about:blank'`: the queued blank navigation aborts the CDP marker load that
`openBrowserUrlForAutomation` awaits right after creating the tab, so the
tool never returned a target and the page never opened.

Let callers that load their own page synchronously opt out of the blank
initialize load. The automation path does so; the marker page it loads
immediately already preempts session restore, and other tab creation paths
keep their blank load because their first navigation is queued the same way.

Adds `browser-open-url-returns-target.e2e.test.ts` under a new
`desktop.builtin-browser` contract: the action resolves with a handle, the
tab loads the page, the returned CDP target answers for that page, and a
second request opens a second tab. The same spec fails on current `dev` with
the abort above.
@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 2, 2026 7:31pm UTC
openwork-den Ready Ready Preview Sep 2, 2026 7:31pm UTC
openwork-diagnostics Ready Ready Preview Sep 2, 2026 7:31pm UTC
openwork-landing Ready Ready Preview, v0 Sep 2, 2026 7:31pm UTC

@reachjalil

Copy link
Copy Markdown
Member Author

Test evidence — browser-open-url-opens-the-page-and-hands-the-agent-a-live-cdp-target-for-it — 0/0 screenshots passed · 4 assertions

✅ 0/0 screenshots passed · 4 assertions · 4 expectations passed · 0 failed · 0 pending

screenshots not uploaded (no BLOB_READ_WRITE_TOKEN)

ℹ️ ASSERTION — 1. browser.open_url resolves with a built-in browser handle

The control action returned provider builtin, tab tab_mtkhrzzq_1, and CDP target 2C83295256C2A629C2870F5F8A57CE7A for http://127.0.0.1:32981/health?first.

ℹ️ ASSERTION — 2. The new tab loads the requested page

Tab tab_mtkhrzzq_1 reports url http://127.0.0.1:32981/health?first with status ready.

ℹ️ ASSERTION — 3. The returned CDP target is the loaded page

Target 2C83295256C2A629C2870F5F8A57CE7A answered Runtime.evaluate with location http://127.0.0.1:32981/health?first and a body containing "ok":true.

ℹ️ ASSERTION — 4. A second browser.open_url opens a second, independent tab

Tab tab_mtkhs1gi_2 (target F03C1F6DFCDEC1233FB3398C10BC27BE) loaded http://127.0.0.1:32981/health?second while tab tab_mtkhrzzq_1 stayed separate.


Test run created 2026-09-02T19:29:50.860Z · Source: evals/results/test-runs/2026-09-02T19-29-50-860Z-browser-open-url-opens-the-page-and-hands-the-agent-a-live-cdp-target-for-it/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4331 --test-run 2026-09-02T19-29-50-860Z-browser-open-url-opens-the-page-and-hands-the-agent-a-live-cdp-target-for-it

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (08e83debf14e172e203d28cb5b999d3f8c335810). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@reachjalil
reachjalil enabled auto-merge (squash) September 2, 2026 19:35
@reachjalil
reachjalil merged commit 1785d36 into dev Sep 2, 2026
24 checks passed

This branch was successfully deployed

4 active deployments
Preview – openwork-den — 08e83deb Deployed Sep 2, 2026 by vercel[bot]
Preview – openwork-app — 08e83deb Deployed Sep 2, 2026 by vercel[bot]
Preview – openwork-landing — 08e83deb Deployed Sep 2, 2026 by vercel[bot]
Preview – openwork-diagnostics — 08e83deb Deployed Sep 2, 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