Skip to content

[FEATURE]: chrome-devtools MCP tab reuse for agentic sessions #18409

@OSSDeveloper

Description

@OSSDeveloper

Verification

  • I have verified this feature hasn't been suggested before.

Problem

When using chrome-devtools MCP for agentic web app development, the agent creates a new browser tab on every action that requires navigation. This leads to:

  1. Tab proliferation - dozens of stale tabs accumulate within a single session
  2. Resource drain - each tab holds memory, WebSocket connections, and browser context
  3. Manual cleanup required - the last open page cannot be programmatically closed, leaving stale tabs that require manual intervention
  4. Poor developer experience - a human cannot sit monitoring the agent 24/7 to close tabs

Use Case

Agentic development workflows require persistent browser sessions where:

  • Login/authentication state persists across operations
  • The agent reuses a single tab for sequential operations on the same web app
  • Tabs are created only when genuinely needed (e.g., parallel workflows)
  • Browser state is cleaned up when the session ends

Current Workaround

The only current workaround is to use navigate_page instead of new_page to reuse an existing tab - but this requires manual pageId tracking and the agent to "know" to use navigate vs new_page. No automatic reuse logic exists.

Proposed Solution

Add reuse_existing_tab?: boolean parameter to new_page tool. When true (or as default), if a page already exists, return the existing page instead of creating a new one.

Alternative: Add close_stale_tabs parameter to auto-close all pages except the first/default one when creating a new page.

Why This Matters

  • Chrome DevTools MCP is the right tool for web app debugging in agentic workflows (CDP protocol access, full DevTools capabilities)
  • Playwright is not a replacement for proper DevTools debugging
  • Tab reuse is standard expected behavior in browser automation
  • Without this, chrome-devtools MCP is impractical for unattended agentic sessions

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions