Feature Request: Auto-launch Chrome when Browser Bridge extension is not connected
Problem
When the Chrome extension (Browser Bridge) is not connected, opencli immediately throws a BROWSER_CONNECT error with no recovery attempt:
ok: false
error:
code: BROWSER_CONNECT
message: Browser Bridge extension not connected
This creates a poor UX — users must manually start Chrome, verify the extension is loaded, then retry the command.
Proposed Solution
Before throwing BROWSER_CONNECT, opencli should proactively attempt to start Chrome and wait briefly for the extension to connect, similar to the self-healing logic already present in some CLI wrappers.
Pseudo-code (~5 lines):
if (error.code === "BROWSER_CONNECT") {
console.warn("Chrome not connected, attempting to start...");
spawn("google-chrome", [...args]); // or appropriate platform command
await sleep(2000); // wait for extension to init
// retry once, then fail with original error if still failing
}
Why this helps
- New users: Get a running experience instead of a cryptic error
- WSL/Linux users: Chrome often needs manual
export DISPLAY=:0 + launch
- Recoverable: Only adds ~2s delay on failure; transparent to already-connected users
References
- Similar pattern in
opencli doctor and Chrome auto-restart crontab setups
BROWSER_CONNECT is the top user friction point in WSL environments
Feature Request: Auto-launch Chrome when Browser Bridge extension is not connected
Problem
When the Chrome extension (Browser Bridge) is not connected,
opencliimmediately throws aBROWSER_CONNECTerror with no recovery attempt:This creates a poor UX — users must manually start Chrome, verify the extension is loaded, then retry the command.
Proposed Solution
Before throwing
BROWSER_CONNECT,openclishould proactively attempt to start Chrome and wait briefly for the extension to connect, similar to the self-healing logic already present in some CLI wrappers.Pseudo-code (~5 lines):
Why this helps
export DISPLAY=:0+ launchReferences
opencli doctorand Chrome auto-restart crontab setupsBROWSER_CONNECTis the top user friction point in WSL environments