[codex] Improve browser bridge connection errors#1229
Open
961882 wants to merge 1 commit intojackwener:mainfrom
Open
[codex] Improve browser bridge connection errors#1229961882 wants to merge 1 commit intojackwener:mainfrom
961882 wants to merge 1 commit intojackwener:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve
BROWSER_CONNECTfailures for Browser Bridge extension disconnects.This change makes browser connection failures easier for both humans and automation to diagnose by surfacing the existing connection kind in structured error output and by recommending the lower-risk recovery path first.
What changed
kind,layer, andrecoveryfields toBrowserConnectErrorenvelopes.browser_bridgelayer.doctormessaging for extension-disconnected states.Root cause
BrowserConnectErroralready tracked a coarse failure kind internally, but the CLI error envelope only exposed the genericBROWSER_CONNECTcode. As a result, agents and scripts had to infer whether the failure was in daemon startup, extension connection, or command execution.The human hint also jumped too quickly to daemon restart guidance, even when the lower-risk fix is reloading the already-installed OpenCLI extension in
chrome://extensions.User impact
Normal successful commands remain unchanged.
On failure, users and agents get clearer, more actionable information:
kind: extension-not-connectedlayer: browser_bridgeopencli doctorValidation
npm test -- src/errors.test.ts src/browser.test.ts src/doctor.test.tsnpm run typecheck