Skip to content

Impossible to start two Chrome instances from DevTools for agents MCP server when using Claude Code CLI #2052

Closed

Description

@gilbertococchi

Description of the bug

It looks like it's not possible to start multiple sessions using DevTools for agents MCP server with Claude Code CLI.

Reproduction

  • Open Claude Code CLI
  • Insert prompt asking to test a page on localhost
  • Claude Code CLI invocates DevTools for agents MCP server opening Chrome Browser instance.
  • In the meantime, open another tab with a different prompt asking to browse another page
  • CHrome is locked and the secont tab is not triggering a new Chrome instance.

Expectation

Claude Code CLI should be able to trigger multiple Chrome Browser instances, only just one per time

MCP configuration

No response

Chrome DevTools MCP version

0.26.0

Chrome version

No response

Coding agent version

No response

Model version

No response

Chat log

No response

Node version

No response

Operating system

None

Extra checklist

  • I want to provide a PR to fix this bug

Activity

  1. natorion commented on May 13, 2026

    @natorion
    Contributor

    We discussed this when we worked on #1019. @OrKoN thoughts?

  2. OrKoN commented on May 13, 2026

    @OrKoN
    Collaborator

    Yes, if ClaudeCode does not start a new instance and shares the instance between conversations, the --experimentalPageIdRouting is the way to make it work for concurrent conversations.

  3. natorion commented on May 13, 2026

    @natorion
    Contributor

    We should document this feature in our docs. Seems like we have nothing.

  4. OrKoN commented on May 13, 2026

    @OrKoN
    Collaborator

    it is still experimental and we have not done evals. Let's bring to planning if it is important. Although with this bug I am not sure if the expectation is that we should manage multiple Chrome instances with one MCP server instance. We decided against this in #1019

  5. passtas commented on May 14, 2026

    @passtas
    Contributor

    @gilbertococchi, if you would start MCP with --isolated flag, you can run as many parallel individual sessions as you'd like even now. Each Claude session will use its own context when spinning up the mcp.

    There are basically two features available atm:

    • For "subagents" (who shares the tools from parent main agent) but within the same session - you can use pageId routing - so they will reuse the same browser context and parallel work will be managed in separate tabs
    • For "Team of Agents"/"Swarm" or just two or more instances of the CLI - use the isolated flag - each session will use its own instance of the mcp and browser.

    My default now is:

    "chrome-devtools": {
                "command": "npx",
                "args": ["-y", "chrome-devtools-mcp@latest", "--experimentalPageIdRouting", "--isolated"]
            }
    

    Basically it works everywhere enabling both modes of operation.

  6. kiluazen commented on May 16, 2026

    @kiluazen

    @gilbertococchi — this is structural to the --remote-debugging-port + --user-data-dir launch model: Chrome refuses to let two instances share a profile (SingletonLock in the user-data-dir), so the second chrome-devtools-mcp invocation either deadlocks on the lockfile or silently no-ops. The isolated-context feature request (#1985) only partly helps — isolated contexts are separate sandboxes, so your second session loses the auth state the first one had, which is usually why people want two instances in the first place.

    For the narrow case "two parallel agent tasks against the same logged-in profile" (versus #1985's "two parallel tasks with different auth states"), there's an architectural sidestep that doesn't show up in the CDP-launch design space: drive the already-running Chrome via an MV3 extension + native messaging host, so there's no second instance for Chrome to refuse. I ship Chrome Relay (https://chrome-relay.kushalsm.com/) on exactly that primitive — multiple concurrent agent invocations can address different tabs of the same running Chrome (chrome-relay --tab <id>) without launching anything. Doesn't help #1985's parallel-auth case at all — for that, @etairl's parallel-browser-mcp work on top of storage-state snapshots is the right primitive — but for the "two prompts, same login" case it takes the multi-instance question off the table.

    Tradeoff worth naming: chrome-relay gives up the chrome-devtools-mcp tool surface (Network.*, Performance.*, accessibility-tree preloading, etc.), so it's not a chrome-devtools-mcp replacement — different point on the local-Chrome axis. Flagging here because the issue title is the right framing for the design-space distinction.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions