Skip to content

Own browser host: CDP commands stall 4–10 s under load where the vendor's host passes them #384

Closed

Description

@SSFSKIM

Problem

At cpu:2 on the hosted macOS runner, cua's browser host stalls ordinary CDP commands (Runtime.evaluate, Input.dispatchMouseEvent) for 4–10 s, while the vendor's host passes the same commands in the same runs. The cause is unknown. Seen in #168's parity-browser-stress batches (PR #382's diagnosis, 2026-11-15).

This is a product finding, not a test one. On a loaded machine, cua's browser actions take seconds where the vendor's take milliseconds, and they can reach the host's 10 s command limit and fail.

Intent

cua's browser host is no slower than the vendor's under load. If it must be, the reason is known and stated.

What to do

Check

In a parity-browser-stress batch, cua's per-command p95 for Runtime.evaluate and Input.dispatchMouseEvent is within the vendor's.

Related: #203 (CDP outages made diagnosable), #141, #168.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P2
    on Nov 15, 2026
  2. added 5 commits that reference this issue on Nov 17, 2026
  3. SSFSKIM commented on Nov 17, 2026

    @SSFSKIM
    OwnerAuthor

    Mechanism found (linux171, task 94, investigation only; 21 hosted runs at cpu:2; report on the Linux VM at ~/.local/share/cua-171/task94/task-94-report.md). The stalled time is inside Chrome. extension/background.js opens the agent tab with active:false, Chrome runs a hidden tab's renderer at background priority, and on the loaded hosted Mac (load average 85–210) it gets no CPU for seconds. Per-hop timing shows cua's service, the pipe, the relay, the host, native messaging and the extension's worker each take milliseconds even during stalls. Runtime.evaluate('1') went unanswered for 2 s while the browser-process-answered Page.getNavigationHistory took 0–27 ms, with the renderer at about 0% CPU. With --disable-renderer-backgrounding, 5 of 7 runs had zero CDP timeouts, against 0 of 14 without it. Correction to this ticket's framing: in the api suite both lanes run cua's own browser service, host and extension (api-lanes.mjs), and per-command p95 is the same on both. cua's lane averages more timeouts (20.6 against 14.4 per run) through a cascade after the shared stall: setup re-runs mid-case and dispose re-attaches the starved tab. Ruling 791: fix the cascade now (setup re-run, dispose never blocks), as its own PR. The anti-backgrounding flag goes in diagnostic stress runs only. Keeping the agent tab at foreground priority (its own unfocused window, or a held capture) waits for a measurement at realistic load (about the core count); if it reproduces there, it goes to the owner as a product decision.

  4. added 7 commits that reference this issue on Nov 17, 2026
  5. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    PR #404 landed (cua 0.28.12, main a39d26f): a starved tab costs one timeout; setup's dispose never attaches. The stall itself (near-saturating load only: 0/18 at ≤50%, 3/4 at 75%, 9/10 at 100%) awaits the owner's call on documenting it vs the agent's own window (1a).

  6. added a commit that references this issue on Nov 18, 2026
  7. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 18, 2026
  8. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: owner chose document-as-limit; docs PR

  9. added
    status:in-review
    and removed
    status:in-progress
    on Nov 18, 2026
  10. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: docs PR #412

  11. removed
    status:in-review
    on Nov 18, 2026
  12. SSFSKIM commented on Nov 18, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: Landed via PR #412 (cua 0.28.14): documented as a heavy-load limit, owner's call; option 1a kept as #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions