A browser call that never settles holds the step until the watchdog redoes it from scratch #329
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
Run 156 (Breakout item 2, vLLM),
openspec.apply[all], about 70 minutes in. The agent sentplaywright_browser_evaluatea polling script whose stop test compares elapsed time with an absolute timestamp (performance.now() - t0 > t0 + 22000). It never ends, so the call never settles. A running tool call counts as work, so the step sits silent: production reads "degraded: openspec.apply[all] has not moved in 468s". At the watchdog's 20-minute tool ceiling (TOOL_CALL_CEILING_S) it redoes the whole step from its entry checkpoint, losing an hour of good work for one hung call. Shell calls are bounded byidle_run(#219, #311); browser (MCP) calls are not.Fix
Bound each MCP tool call, and
playwright_browser_evaluateespecially, by its own limit (a few minutes, or what the call names). On the limit, fail that call with a result that says why ("the script did not settle in N s; check its loop ends"), and the session goes on. Keep the step-wide redo for a session that is itself stuck.Done when
An evaluate whose promise never settles comes back as a failed call within its limit, and the step carries on in the same session. A test or a simulated run covers it.
Shipped in PR #356 (
c00c62f1, live on production).browser_evaluateso its function races a 180 s limit in the page. A promise that never settles fails that one call with "the script did not settle in 180 s; check its loop ends", and the session goes on.tests/agent/test_path_guard.py.