Skip to content

fix(browser-automation): restore session recovery error guidance - #7371

Open
bb-slop-cop[bot] wants to merge 2 commits into
mainfrom
slopcop/issue-7349
Open

bb-slop-cop[bot] wants to merge 2 commits into
mainfrom
slopcop/issue-7349

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The browser automation CLI recognized only one stopped/expired error phrasing. Other errors emitted by its host and process implementation fell through to command_failed, omitting session recovery guidance. Cancellation and timeout close the session, so those failures also need the reopen hint.

Report: https://get-bb.github.io/reports/issues/7349.html — REPRODUCED, high confidence, repeated by the same investigator in two clean checkouts at 7c1353d80729983b86ea1555d18b42407f320406.

What changed

  • Recognize stopped/expired session variants and browser-work cancellation at the existing CLI error boundary.
  • Preserve the original message and return session_unavailable with reopen guidance; cancellation/timeout additionally suggests the existing --timeout option and 120-second ceiling.
  • Extend the existing JSON/text CLI regression table and document recovery in the plugin skill.
  • Three files, 34 additions + 11 deletions = 45 changed text lines, measured with git diff --numstat origin/main.
  • No dependencies, lockfiles, generated files, storage changes, public protocol/schema changes, or security-boundary changes.

How you verified

  • Added the regression before changing production code. In each of two clean trusted checkouts, pnpm exec turbo run test --filter=bb-plugin-browser-automation -- cli.test.ts failed in the same three cases: command_failed instead of session_unavailable, without a recovery hint; 11 other cases passed.
  • After the fix, pnpm exec turbo run test lint typecheck --filter=bb-plugin-browser-automation passed: 106 tests across 8 files, plus lint and typecheck.
  • pnpm exec turbo run build --filter=@get-bb/plugin-sdk and pnpm exec turbo run build --filter=bb-plugin-browser-automation passed.
  • Formatting and git diff --check passed; all changed files are text.
  • The reproduction injects trusted producer errors at the CLI execution boundary; it does not launch a browser or induce a live worker restart.
  • Initial workspace-wide build encountered missing SDK artifacts in an unrelated plugin before the explicit SDK build; the scoped build passed after preparing those artifacts.

Fixes #7349

AGENT GENERATED

…_unavailable

Match "open a new session", which every session-loss producer includes,
so "Browser session stopped; open a new session" (browser crash or
preview loss) also gets the reopen hint. Timeouts keep the extra
--timeout advice. Document the broadened classification in the skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

browser-automation CLI: three session-loss errors get command_failed with no reopen or --timeout hint

2 participants