Skip to content

Commit aa21d4e

Browse files
committed
fix(browser): clarify existing-session timeout limits
1 parent 1e8dc23 commit aa21d4e

4 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Docs: https://docs.openclaw.ai
3030

3131
### Fixes
3232

33+
- Browser/tool: tell agents not to pass per-call `timeoutMs` on existing-session evaluate and other Chrome MCP actions that reject timeout overrides.
3334
- Voice-call/Telnyx: preserve inbound/outbound callback metadata and read transcription text from Telnyx's current `transcription_data` payload.
3435
- Codex harness: send verbose tool progress to chat channels for native app-server runs, matching the Pi harness `/verbose on` and `/verbose full` behavior. (#70966) Thanks @jalehman.
3536
- Codex models: fetch paginated Codex app-server model catalogs, mark truncated `/codex models` output, and keep ChatGPT OAuth defaults on the `openai-codex/gpt-5.5` route instead of the OpenAI API-key route.

docs/gateway/troubleshooting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ Common signatures:
482482
- `existing-session file uploads do not support element selectors; use ref/inputRef.` → Chrome MCP upload hooks need snapshot refs, not CSS selectors.
483483
- `existing-session file uploads currently support one file at a time.` → send one upload per call on Chrome MCP profiles.
484484
- `existing-session dialog handling does not support timeoutMs.` → dialog hooks on Chrome MCP profiles do not support timeout overrides.
485+
- `existing-session evaluate does not support timeoutMs overrides.` → omit `timeoutMs` for `act:evaluate` on `profile="user"` / Chrome MCP existing-session profiles, or use a managed/CDP browser profile when a custom timeout is required.
485486
- `response body is not supported for existing-session profiles yet.``responsebody` still requires a managed browser or raw CDP profile.
486487
- stale viewport / dark-mode / locale / offline overrides on attach-only or remote CDP profiles → run `openclaw browser stop --browser-profile <name>` to close the active control session and release Playwright/CDP emulation state without restarting the whole gateway.
487488

extensions/browser/src/browser-tool.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ async function runSnapshotToolCall(params: {
299299
await tool.execute?.("call-1", { action: "snapshot", target: "host", ...params });
300300
}
301301

302+
describe("browser tool description", () => {
303+
it("warns agents about existing-session act timeout limits", () => {
304+
const tool = createBrowserTool();
305+
306+
expect(tool.description).toContain('profile="user"');
307+
expect(tool.description).toContain("omit timeoutMs on act:evaluate");
308+
expect(tool.description).toContain("existing-session profiles");
309+
});
310+
});
311+
302312
describe("browser tool snapshot maxChars", () => {
303313
registerBrowserToolAfterEachReset();
304314

extensions/browser/src/browser-tool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ export function createBrowserTool(opts?: {
382382
"Control the browser via OpenClaw's browser control server (status/start/stop/profiles/tabs/open/snapshot/screenshot/actions).",
383383
"Browser choice: omit profile by default for the isolated OpenClaw-managed browser (`openclaw`).",
384384
'For the logged-in user browser, use profile="user". A supported Chromium-based browser (v144+) must be running on the selected host or browser node. Use only when existing logins/cookies matter and the user is present.',
385+
'For profile="user" or other existing-session profiles, omit timeoutMs on act:evaluate, hover, scrollIntoView, drag, select, and fill; that driver rejects per-call timeout overrides for those actions.',
385386
'When a node-hosted browser proxy is available, the tool may auto-route to it. Pin a node with node=<id|name> or target="node".',
386387
"When using refs from snapshot (e.g. e12), keep the same tab: prefer passing targetId from the snapshot response into subsequent actions (act/click/type/etc).",
387388
'For stable, self-resolving refs across calls, use snapshot with refs="aria" (Playwright aria-ref ids). Default refs="role" are role+name-based.',

0 commit comments

Comments
 (0)