Skip to content

docs(browser): add CDP recovery boundaries#115

Open
MagMueller wants to merge 1 commit into
mainfrom
stale-proxy-guide
Open

docs(browser): add CDP recovery boundaries#115
MagMueller wants to merge 1 commit into
mainfrom
stale-proxy-guide

Conversation

@MagMueller

@MagMueller MagMueller commented Jul 23, 2026

Copy link
Copy Markdown

Problem

Two CDP failures require different recovery layers:

  • -32001 means the attached target session is stale even when the browser socket remains usable. Reconnecting the root socket does not replace that target session.
  • A persistent ERR_TUNNEL_CONNECTION_FAILED belongs to the browser proxy route. Reloading, reattaching, or reconnecting to the same endpoint preserves that route.

Without this distinction, an agent can repeatedly retry the wrong layer.

Change

  • Tell the agent to re-list targets, reattach, and retry once after -32001.
  • Tell the agent to inspect Page.navigate.errorText and switch source or replace the browser after a persistent tunnel failure.
  • Keep recovery in the existing skill: no automatic retry machinery or new abstraction.

Validation

  • bun typecheck in packages/bcode-browser
  • Repository pre-push typecheck with Bun 1.3.14
  • git diff --check

Summary by cubic

Clarified CDP recovery boundaries in the browser execution skill docs to stop retries at the wrong layer. For -32001, list targets again, reattach with session.use(...), and retry once (note: session.connect() does not replace a stale target session); for Page.navigate with errorText like persistent ERR_TUNNEL_CONNECTION_FAILED, treat it as a proxy route issue and switch source or replace the cloud browser instead of reloading, reattaching, or reconnecting.

Written for commit 8f5d2b9. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

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.

1 participant