#23363: Browser: fallback to managed profile and improve runtime diagnostics
cli
size: M
Cluster:
Browser Enhancements and Fixes
## Summary
- Automatically fall back to the self-managed `openclaw` profile when relay mode is selected implicitly but no relay tab is attached.
- Add executable-path health checks for browser runtime and return clearer remediation for missing Playwright Chromium.
- Expand browser status/CLI diagnostics and error mapping so relay-tab-missing and Chromium-missing failures are clearly distinguished.
## Testing
- `corepack pnpm vitest src/browser/routes/agent.shared.test.ts src/browser/chrome.test.ts src/browser/client.test.ts`
- `corepack pnpm tsgo`
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Implemented automatic fallback from relay mode to self-managed `openclaw` profile when no relay tab is attached, along with comprehensive runtime diagnostics for Playwright Chromium and relay tab status.
Key changes:
- Added `inspectBrowserExecutableConfig()` to detect missing Playwright Chromium and provide remediation command
- Implemented `withRouteTabContext()` fallback logic that automatically retries with `openclaw` profile when relay tab is missing (only for implicit profile requests)
- Enhanced error messages to clearly distinguish relay-tab-missing (409) vs Chromium-missing (503) scenarios
- Expanded browser status endpoint with `activeProfile`, `executablePathExists`, `missingPlaywrightChromium`, `relayAttachedTabCount`, and `fixSteps` fields
- Updated CLI diagnostics to display `activeProfile`, executable path health, relay tab count, and actionable fix steps
- Added comprehensive test coverage for fallback routing and executable path inspection
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- Well-structured implementation with comprehensive test coverage, clear error handling, and proper fallback logic that respects explicit user choices while providing intelligent defaults
- No files require special attention
<sub>Last reviewed commit: 42b249f</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#10367: CLI/Ops: resilient browser fill + failover hardening + operations t...
by cluster2600 · 2026-02-06
82.0%
#14944: fix(browser): prefer openclaw profile in headless/noSandbox environ...
by BenediktSchackenberg · 2026-02-12
81.7%
#6193: fix(browser): default to openclaw profile instead of chrome extensi...
by mikezaoldyeck · 2026-02-01
79.3%
#22952: fix(browser): suggest remote profile when local Chrome is not insta...
by dashed · 2026-02-21
78.9%
#15304: feat(browser): add browser-use no-relay profile driver
by rajanrengasamy · 2026-02-13
77.7%
#13568: Fix browser (OpenClaw-managed) launch fail by binding remote debugg...
by singlag · 2026-02-10
77.6%
#21314: feat: enhance browser relay with custom naming and diagnostic tools
by kelvinCB · 2026-02-19
76.8%
#9020: fix(browser): skip port ownership and WS reachability checks for re...
by yepack · 2026-02-04
76.1%
#8614: fix(browser): detect early chromium exit to prevent startup hang
by Wren-OC · 2026-02-04
76.1%
#17588: fix(relay): survive WS disconnects and MV3 worker restarts
by Unayung · 2026-02-15
76.1%