Verification
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:
- Tab proliferation - dozens of stale tabs accumulate within a single session
- Resource drain - each tab holds memory, WebSocket connections, and browser context
- Manual cleanup required - the last open page cannot be programmatically closed, leaving stale tabs that require manual intervention
- 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
Verification
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:
Use Case
Agentic development workflows require persistent browser sessions where:
Current Workaround
The only current workaround is to use
navigate_pageinstead ofnew_pageto 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?: booleanparameter tonew_pagetool. Whentrue(or as default), if a page already exists, return the existing page instead of creating a new one.Alternative: Add
close_stale_tabsparameter to auto-close all pages except the first/default one when creating a new page.Why This Matters
References
OPENCODE_PIDfor session isolation (acknowledges chrome-devtools MCP session management issues)