[BUG] Chrome native host dies when extension service worker goes idle, breaking browser tools after initial success

Resolved 💬 3 comments Opened Jan 5, 2026 by dial481 Closed Feb 20, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Chrome native host process dies after successfully handling initial ping/get_status messages. The MV3 service worker appears to go idle, which closes the native messaging port and terminates the native host.

Key difference from #15463: The socket IS created, the native host DOES start, initial communication succeeds (ping/pong works), but then the connection dies within ~30 seconds of inactivity.

What Should Happen?

  1. Native host should remain alive while Claude Code session is active
  2. Extension should implement keep-alive mechanism (periodic ping)
  3. Or Claude Code MCP should handle reconnection gracefully
  4. Or extension should use persistent connection strategy

Error Messages/Logs

[INFO:native_messaging_host.cc] Connect pipe name: com.anthropic.claude_code_browser_extension
[INFO:native_messaging_host.cc] Starting native messaging host: /home/frank/.claude/chrome/chrome-native-host
# Works initially...
MCP client 1 connected. Total clients: 1
# Then dies silently

Steps to Reproduce

  1. Start Xvfb and Chromium with extension loaded
  2. Start Claude Code with --chrome flag in tmux
  3. Extension service worker initializes, spawns native host
  4. Native host creates socket at /tmp/claude-mcp-browser-bridge-$USER
  5. Initial ping/get_status messages succeed
  6. tabs_context_mcp works, screenshots work
  7. After ~30 seconds of inactivity, native host process dies
  8. Subsequent browser tool calls fail with "Browser extension is not connected"

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

Related Issues

  • #15463 - Native host zombie state (socket never created) - different symptom, possibly related cause
  • #14391 - Chromium browser support (workaround applied)

View original on GitHub ↗

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