Skip to content

Commit 8f5d2b9

Browse files
committed
docs(browser): add CDP recovery boundaries
1 parent 89f8ffc commit 8f5d2b9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • packages/bcode-browser/skills/browser-execute

packages/bcode-browser/skills/browser-execute/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ const page = targets.find(t => t.type === "page" && !t.url.startsWith("chrome://
104104
await session.use(page.targetId)
105105
```
106106
107+
If a target-scoped command throws `CdpError` code `-32001` (`Session with given id not found`), the browser connection is still usable but the target session is stale. List targets again, `session.use(...)` the intended page, and retry the rejected command once. Repeated `session.connect()` calls do not replace a stale target session.
108+
107109
## Driving a page
108110
Domain methods follow `session.<Domain>.<method>(params)` and return Promises.
109111
The full surface (652 commands) is the Chrome DevTools Protocol.
@@ -142,6 +144,8 @@ await session.Page.captureScreenshot({ format: "png" })
142144
// for the rare case you want to process it programmatically.
143145
```
144146
147+
`Page.navigate` can return a non-empty `errorText` instead of throwing. Treat it as a failed navigation. If `ERR_TUNNEL_CONNECTION_FAILED` persists, reloading, reattaching, or reconnecting to the same endpoint cannot change its proxy route; use another source or replace the cloud browser instead of retrying it.
148+
145149
## Reusing code
146150
The agent-workspace is per-project: `./.bcode/agent-workspace/`.
147151
Use this to write memory files, scripts, and helper functions.

0 commit comments

Comments
 (0)