feat(browser): support evaluate timeouts for existing sessions#103181
Conversation
|
Source review note for #103137: Best-fix verdict: this looks like the tightest fix for the reported The regression coverage is pointed at the right seam: explicit Remaining gap: I did not run a Windows/Edge live repro here, so maintainer confidence still rests on the reporter repro plus the checked-in focused tests/CI. I did not find a source-level blocker. |
b9903e9 to
bf8b7c0
Compare
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
53c67ab to
59ba6a7
Compare
|
Land-ready verification on exact head
Security/functionality check: this does not enable evaluate, change profile authorization, weaken current-tab/navigation policy, or alter unrelated existing-session actions. It only removes the stale timeout rejection for evaluate and uses the adapter's existing SDK cancellation path. No mocks, managed-browser substitution, or test hooks were used in live proof. Scope correction: this PR is independently proven for Chrome MCP existing-session profiles and no longer claims to close #103137, which reports the distinct managed |
|
Merged via squash.
|
…law#103181) * fix(browser): honor evaluate timeout for existing sessions Signed-off-by: Ho Lim <[email protected]> * docs(browser): align existing-session evaluate timeouts --------- Signed-off-by: Ho Lim <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Chrome MCP existing-session profiles rejected
timeoutMsonact:evaluatebefore the request reached the adapter, even though the adapter and MCP SDK support a per-request timeout.This is an independent existing-session capability correction. It does not fix or close #103137, whose report uses the managed
openclawPlaywright/CDP driver rather than Chrome MCP.Why This Change Was Made
act:evaluaterequests to carrytimeoutMsthrough the Browser tool and/actroutetype,hover,scrollIntoView,drag,select, andfillbrowser.actionTimeoutMswhen an agent omits the evaluate timeout, keeping host and node-proxy transport budgets alignedThe implementation uses the existing operation-budget path:
evaluateChromeMcpScriptforwards the resolved timeout toclient.callTool(..., { timeout }). The official MCP TypeScript SDK client documentation defines this per-request override, and Chrome DevTools MCP's evaluate implementation awaits asynchronous evaluate functions.User Impact
Users and agents can set a longer or shorter evaluate budget on
userand custom existing-session profiles. Other unsupported per-action timeout overrides remain rejected, so this does not broaden unrelated Chrome MCP behavior.Evidence
Sanitized AWS Crabbox, immutable contributor head
bf8b7c09127849da6309d9696c110631a9817eb7, public networking, no Tailscale or hydrated credentials:The focused route regression proves an explicit
60000msbudget reachesevaluateChromeMcpScript; the Browser tool regression proves configuredactionTimeoutMsis injected for existing-session evaluate calls. Exact final-head tests, changed gates, live Gateway/OpenAI agent proof against a real Chrome MCP session, and CI evidence will be posted before merge.AI-assisted
AI assistance was used to trace the full Browser tool, Gateway route, Chrome MCP adapter, MCP SDK contract, tests, documentation, and live validation path. Maintainer review corrected the original issue-closing relationship and expanded the public documentation before landing.
Signed-off-by: Ho Lim [email protected]