Skip to content

fix(browser): preserve no-display launch diagnostics#102946

Merged
steipete merged 2 commits into
mainfrom
codex/fix-browser-no-display-error
Jul 9, 2026
Merged

fix(browser): preserve no-display launch diagnostics#102946
steipete merged 2 commits into
mainfrom
codex/fix-browser-no-display-error

Conversation

@steipete

@steipete steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Closes #97027

What Problem This Solves

Fixes an issue where managed browser automation on a Linux service host without DISPLAY or WAYLAND_DISPLAY either stopped on an opaque launch failure or forced callers to infer recovery from human text. The same deterministic preflight failure could also consume the managed-launch cooldown and block a subsequent explicit headless retry.

Why This Change Was Made

Implicit managed launches now use the existing Linux headless fallback, but an explicit headed choice remains authoritative and fails before Chrome starts. That failure keeps the existing actionable message and carries a closed no_display_for_headed_profile reason plus typed details through local routes, the HTTP client, Gateway RPC, permission routes, and opt-in browser-node proxy envelopes. Mixed-version nodes retain the legacy error contract unless the caller advertises the new envelope.

User Impact

Server-side browser automation can start headlessly when the user has not chosen a mode. Explicit headed configurations are never silently overridden; agents and programmatic callers can branch on a stable reason, then recover with openclaw browser start --headless, OPENCLAW_BROWSER_HEADLESS=1, a headless profile/config choice, or a real display server. Deterministic no-display preflight failures no longer poison launch cooldown.

Evidence

  • Blacksmith Testbox: 146 focused browser tests passed, followed by the complete changed-surface gate (extension production/test type checks, extension lint, import-cycle and repository guards): https://github.com/openclaw/openclaw/actions/runs/29024582684
  • AWS Crabbox jade-crayfish (cbx_8f76bd8fabee): exact patch-content digest 49bd9941171726a79ee407cd7f99f640d7495425ebbe12f301b100cc6f64baf2 verified; build run run_d281f5376b04 passed; live run run_2cb350ea7889 used real Playwright Chromium 149 to load “Example Domain” through both implicit linux-display-fallback and explicit one-shot --headless recovery.
  • The same real Dev Gateway returned the structured explicit-headed failure with zero Chrome processes before/after rejection.
  • Live run run_2cb350ea7889 also required a real Gateway-backed openai/gpt-5.4 agent turn to discover and call the browser tool; its JSONL transcript was checked for the exact browser start call, the causal failing tool result, actionable no-display text, and no embedded Gateway fallback.
  • Fresh autoreview: no accepted/actionable findings after repairing a discovered node-proxy stale-target 404 regression.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: L maintainer Maintainer-authored PR labels Jul 9, 2026
@openclaw-barnacle openclaw-barnacle Bot added the channel: whatsapp-web Channel integration: whatsapp-web label Jul 9, 2026
@steipete
steipete force-pushed the codex/fix-browser-no-display-error branch from d83102e to 070b3f6 Compare July 9, 2026 15:13
@openclaw-barnacle openclaw-barnacle Bot removed the channel: whatsapp-web Channel integration: whatsapp-web label Jul 9, 2026
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready verification for exact PR head 070b3f6d528ccbdc3278b37546b28198da7ab0ff:

  • Native exact-head CI/Testbox gate: https://github.com/openclaw/openclaw/actions/runs/29028613169
  • Blacksmith Testbox action https://github.com/openclaw/openclaw/actions/runs/29024582684 passed 146 focused Browser tests and the complete changed-surface gate (production/test types, extension lint, import-cycle and repository guards).
  • AWS Crabbox jade-crayfish (cbx_8f76bd8fabee) verified exact patch-content digest 49bd9941171726a79ee407cd7f99f640d7495425ebbe12f301b100cc6f64baf2; build run run_d281f5376b04 passed.
  • Live run run_2cb350ea7889 used real Playwright Chromium 149 and a real Dev Gateway. It proved implicit linux-display-fallback, explicit headed fail-before-spawn with reason=no_display_for_headed_profile and zero Chrome processes, and one-shot --headless recovery by loading and snapshotting “Example Domain”.
  • The same Gateway used a real openai/gpt-5.4 agent turn. JSONL inspection verified that the agent discovered and invoked Browser, observed the causal structured no-display failure, emitted AGENT_BROWSER_FAILURE_OBSERVED, and did not use an embedded fallback.
  • Fresh branch autoreview found no accepted/actionable findings (0.95 confidence). Review artifacts record the changed branch sweep and no known proof gaps.

CHANGELOG.md remains release-owned; the PR body carries the release-note context and issue attribution.

@steipete
steipete merged commit 3c048ef into main Jul 9, 2026
99 of 101 checks passed
@steipete
steipete deleted the codex/fix-browser-no-display-error branch July 9, 2026 15:26
@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete

steipete commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Post-merge integration proof after the overlapping #102952 credential-policy landing:

Simon-XYDT pushed a commit to Simon-XYDT/openclaw that referenced this pull request Jul 9, 2026
* fix(browser): preserve no-display launch diagnostics

* chore: keep changelog release-owned
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 10, 2026
* fix(browser): preserve no-display launch diagnostics

* chore: keep changelog release-owned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Make managed browser launch degrade cleanly when no display server is available

1 participant