[BUG] Claude in Chrome: tabId/duration parameters rejected as string instead of number after extension reconnect

Resolved 💬 3 comments Opened Mar 14, 2026 by LeoGestetner Closed Jun 6, 2026

Description

When using Claude in Chrome MCP tools from Claude Code (CLI), after the extension disconnects and reconnects (which happens frequently on heavy SPAs like Azure Portal), all tool calls that accept tabId (type: number) or duration (type: number) parameters fail with type validation errors — the values are being passed as strings instead of numbers.

Steps to Reproduce

  1. Start a Claude Code session and connect to Claude in Chrome
  2. Use tabs_context_mcp — works fine, returns tabId (e.g., 629108548)
  3. Use computer with action: screenshot and tabId: 629108548 — works fine initially
  4. Navigate to a heavy SPA (e.g., Azure Portal at portal.azure.com)
  5. The extension disconnects (⚠️ "Claude in Chrome is not connected" message)
  6. Reconnect (extension prompts user, user accepts)
  7. tabs_context_mcp works again — returns the same tabId
  8. All subsequent tool calls with tabId or duration fail with:
MCP error -32602: Input validation error: Invalid arguments for tool computer: [
  {
    "code": "invalid_type",
    "expected": "number",
    "received": "string",
    "path": ["tabId"],
    "message": "Expected number, received string"
  }
]

Affected Tools (all tools requiring tabId)

  • computer (tabId + duration)
  • screenshot
  • read_page
  • find
  • form_input
  • javascript_tool
  • get_page_text
  • navigate (sometimes works, sometimes doesn't)

Tools NOT Affected

  • tabs_context_mcp — continues to work after reconnect
  • tabs_create_mcp — continues to work after reconnect

Environment

  • macOS
  • Claude Code CLI (latest)
  • Claude in Chrome extension
  • Chrome browser
  • Triggered on: Azure Portal (portal.azure.com), but likely reproducible on any heavy SPA that causes disconnects

Expected Behavior

After reconnecting, tool calls with numeric parameters should continue to work as they did before the disconnect. The tabId should be passed/validated as a number regardless of reconnection state.

Workaround

None found. The only recovery is to end the Claude Code session entirely and start fresh.

Notes

  • The bug is persistent within a session — once the type-casting breaks, it never recovers
  • tabs_context_mcp returns tabId as a number in its JSON response, but downstream tools reject it
  • This suggests the serialization layer between Claude Code and the extension MCP server is converting numbers to strings after reconnection
  • This is NOT the same as issue #31645 (invalid tab ID from chrome://newtab) — the tab ID is valid, just the wrong type

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗