Skip to content

Commit c015c79

Browse files
committed
docs(browser): distinguish follow-up calls
1 parent 1a5ffe7 commit c015c79

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ console.log(JSON.stringify(titles))
202202
## Guardrails
203203
- Top-level `import` statements inside the snippet body are not allowed. Use `await import(...)` instead.
204204
- No CPU-bound infinite loops without `await` — they ignore the timeout. Insert `await new Promise(r => setTimeout(r, 0))` to yield.
205-
- `browser_execute` defaults to 60s; longer timeouts delay your next turn. A timeout ends that call's CDP access without closing the connection, though its last command may still run. `Target.getTargets` succeeding means CDP is live; `session.connect()` is then a no-op, and reattaching the same target does not restart its renderer.
205+
- `browser_execute` defaults to 60s; longer timeouts delay your next turn. After a timeout, only that call loses CDP access; the next call can continue on the same connection and target. The last command sent by the timed-out call may still finish. `Target.getTargets` succeeding means CDP is live; `session.connect()` is then a no-op, and reattaching the same target does not restart its renderer.
206206
207207
## Console
208208
- `console.log`, `console.error`, `console.warn`, `console.info`, `console.debug` are all captured and streamed to the user. Treat them as your stdout. Other `console.*` methods write to bcode's stderr without being captured into the tool result.

packages/bcode-browser/src/browser-execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ export const make = Effect.fn("BrowserExecute.make")(function* (dataDir: string)
262262
const output = timeoutOutput(captured.output)
263263
const error = new Error(
264264
[
265-
`browser_execute timed out after ${timeout} ms; this invocation can no longer issue CDP commands, but the timeout did not close the CDP session`,
265+
`browser_execute timed out after ${timeout} ms; this call can no longer issue CDP commands, but the next browser_execute call receives the unchanged CDP session`,
266266
output.trim() ? `Partial console output before timeout:\n${output.trimEnd()}` : "",
267267
]
268268
.filter(Boolean)

0 commit comments

Comments
 (0)