Skip to content

Make pageId routing default to prevent multi-agent race conditions #1245

Closed

Description

@bcfmtolgahan

Description of the bug

Problem

In multi-agent workflows (e.g., Claude Code with parallel agents), concurrent select_page calls create race conditions because select_page + action is not atomic. Agent A calls select_page(page1), then Agent B calls select_page(page2) before
Agent A's next tool call — Agent A now operates on the wrong page.

This is already solved by --experimental-page-id-routing, which allows tools to accept pageId directly. But since it's behind an experimental flag, most users don't know about it.

Proposal

  1. Make pageId always available on page-scoped tools (remove the experimental gate)
  2. Fix waitForEventsAfterAction to use the explicit target page's emulation settings instead of the global selected page — currently it reads CPU throttling / network conditions from #selectedPage, which may be a different page than the one being
    operated on

Reproduction

No response

Expectation

No response

MCP configuration

No response

Chrome DevTools MCP version

0.20.3

Chrome version

No response

Coding agent version

No response

Model version

No response

Chat log

No response

Node version

No response

Operating system

macOS

Extra checklist

  • I want to provide a PR to fix this bug

Activity

  1. added theissue type on Mar 26, 2026
  2. removed theissue type on Mar 30, 2026
  3. added theissue type on Mar 30, 2026
  4. OrKoN commented on Mar 30, 2026

    @OrKoN
    Collaborator

    We should fix waitForEventsAfterAction first and this is arguably a bug in the experimental feature but I would re-classify the entire issue as a feature request.

  5. added a commit that references this issue on Aug 21, 2026
    e932e8a
  6. samiyac commented on Aug 27, 2026

    @samiyac
    Contributor

    Fixed with #1777

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions