Repository navigation
[Claimed #3423] [fix]: report cached browser start failures in browse doctor - #3439
Merged
Merged
Conversation
DriverSessionManager keeps the last init failure for retry backoff, but status() did not expose it, so browse doctor reported a daemon whose browser failed to start the same as one that had not started yet. Addresses part of #3359. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Show the cached start failure in the existing component row for the session's target (browser, browserbase, or cdp) instead of always adding a separate browser row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…23' into external-contributor-pr-3423
🦋 Changeset detectedLatest commit: 5a67965 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Author
|
This mirrored PR has been merged into |
shrey150
approved these changes
Nov 10, 2026
shrey150
left a comment
Collaborator
There was a problem hiding this comment.
CI green. Verified end to end: a failed start now replaces the target's doctor row (browser / browserbase / cdp) instead of adding a duplicate. Thanks @kenneshagarg!
This was referenced Nov 10, 2026
shrey150
pushed a commit
that referenced
this pull request
Nov 13, 2026
Release Browse independently of the Stagehand SDKs. Merging this PR publishes the CLI from the merged commit. ## 0.11.4 ### Patch Changes - [#3426](#3426) [`f93e6d1`](f93e6d1) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Report an error when an active browser session disconnects during command startup instead of automatically starting a replacement. - [#3379](#3379) [`73fdba0`](73fdba0) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - remove unused deepmerge dependency - [#3330](#3330) [`dc8eb40`](dc8eb40) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - bump zod to 4.6.6 - [#3289](#3289) [`aa67fee`](aa67fee) Thanks [@shrey150](https://github.com/shrey150)! - Add `--stagehand` flag to `browse cloud extensions upload`. - [#3439](#3439) [`2fe947c`](2fe947c) Thanks [@github-actions](https://github.com/apps/github-actions)! - Make `browse doctor` fail and show the cause when the session's last browser start failed - [#3400](#3400) [`ce298c6`](ce298c6) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Add token validation to internal local Functions runtime requests - [#3408](#3408) [`6a56cbb`](6a56cbb) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Fix Windows package-manager command launching for Functions and templates, and terminate child processes when skill installation times out. - [#3391](#3391) [`3fbda6b`](3fbda6b) Thanks [@seanmcguire12](https://github.com/seanmcguire12)! - Validate daemon directory locations before connecting to a session. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
aryansahai22
added a commit
to aryansahai22/stagehand
that referenced
this pull request
Nov 15, 2026
…ch the fix hint to the target's doctor row
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.
Mirrored from external contributor PR #3423 after approval by @shrey150.
Original author: @kenneshagarg
Original PR: #3423
Approved source head SHA:
4c4bcfa62a31868364139ab8a1e7f1df1c464dfe@kenneshagarg, please continue any follow-up discussion on this mirrored PR. When the external PR gets new commits, this same internal PR will be marked stale until the latest external commit is approved and refreshed here.
Original description
why
When a session's browser fails to start, every
browsecommand errors butbrowse doctorstill reports all[ok].DriverSessionManagerkeeps the failure for retry backoff, butstatus()doesn't expose it, so doctor can't tell a failed start from a daemon that hasn't started a browser yet. Root cause identified by @DevChiniwala in #3359.Addresses part of #3359: this fixes the false all-clear from
browse doctor, not the underlyingECONNREFUSED, which I haven't reproduced with a managed local browser.what changed
status()now includesinitErrorwhile a failed start is cached. it's absent otherwise, so existingstatusoutput doesn't change.browse doctorreports the failure in the existing row for the session's target (browser,browserbase, orcdp), with the first line of the error, and puts the full error in--jsondetails. it doesn't launch Chrome or retry the failed start.Fix:line, since the right fix depends on the cause.I put this in
status()rather than an explicit launch probe so doctor stays read-only. happy to change that if you'd prefer a probe.test plan
driver-foundation.test.ts: a realDriverSessionManagerwith a rejected launch reportsinitErrorfromstatus()without launching again, and reports none before any attempt.doctor.test.ts: for each target kind,initErrorproduces afailverdict and exactly one row for that component, with the first-line message, the full error in details, and the rendered[fail]line. a running daemon without a failed start adds no component row.browse openagainst a closed CDP port, thenbrowse doctor, which printed[fail] cdp last start failed: Failed to open CDP WebSocketand exited 1.pnpm checkpasses. CLI tests: 557 passed, 1 failed. that failure,cli-surface.test.ts > prints browse root help, also fails without this change.check-changesetsalso fails onmainbecause of the existingagent-discoverability-metadata.md.🤖 Generated with Claude Code
Summary by cubic
Fixes
browse doctorreporting all[ok]when a session's browser failed to start, so the failure is no longer hidden. The daemon now exposes the cached start failure throughstatus().initError, andbrowse doctorrenders a[fail]in the session's target row (browser,browserbase, orcdp) with the first line of the error; the full error appears in--jsondetails. The check is read-only and doesn't relaunch or retry the failed start. Addresses part of #3359.Written for commit 4c4bcfa. Summary will update on new commits.