Subagent crashes CLI process when chrome-devtools MCP returns results (Ink renderer crash at createInstance)

Resolved 💬 3 comments Opened Apr 25, 2026 by Asdafers Closed Apr 28, 2026

Summary

When a subagent spawned via the Agent tool has the chrome-devtools-mcp plugin enabled and calls any chrome-devtools tool (e.g. take_screenshot, list_pages), the entire Claude Code CLI process crashes. The crash occurs inside the Ink terminal rendering pipeline at createInstance, not in the MCP connectivity layer.

Version

2.1.119 (bun runtime — /$bunfs/root/... paths)

Steps to Reproduce

  1. Enable chrome-devtools-mcp@claude-plugins-official in .claude/settings.json
  2. Spawn a subagent with Agent() tool that uses chrome-devtools MCP tools
  3. The subagent calls list_pages or take_screenshot (chrome-devtools MCP)
  4. CLI process crashes

The crash is reproducible 100% of the time — hit it on 3 consecutive spawns across 3 separate subagent instances (explorer, explorer-2, explorer-3).

Stack Trace

Partial stack provided by user (minified, from /$bunfs/root/src/entrypoints/cli.js):

- createInstance (/$bunfs/root/src/entrypoints/cli.js:502:249)
- PL (/$bunfs/root/src/entrypoints/cli.js:484:58456)
- LYH (/$bunfs/root/src/entrypoints/cli.js:484:88642)
- rZH (/$bunfs/root/src/entrypoints/cli.js:484:87842)
- RD6 (/$bunfs/root/src/entrypoints/cli.js:484:86738)
- iZH (/$bunfs/root/src/entrypoints/cli.js:484:86558)
- jM_ (/$bunfs/root/src/entrypoints/cli.js:484:83272)
- aH (/$bunfs/root/src/entrypoints/cli.js:484:6552)
- LH (/$bunfs/root/src/entrypoints/cli.js:484:5006)
- FH (/$bunfs/root/src/entrypoints/cli.js:484:5318)

The call chain (createInstance → PL → LYH → rZH → RD6 → iZH → jM_ → aH → LH → FH) maps to the Ink React renderer — specifically the reconciler.createInstance path that builds and renders the terminal UI tree.

What Was Working Correctly

  • Chrome was running correctly with --remote-debugging-pipe (pipe-based transport, not port 9222)
  • The MCP tool call itself succeeded (chrome responded)
  • The crash happened when the CLI attempted to render the MCP tool result in the terminal

Hypothesis

Chrome-devtools MCP returns large base64 payloads (screenshots can be 100–500 KB base64-encoded). When a subagent's tool result contains a large payload, the Ink renderer crashes during reconciliation — likely a buffer size or string handling issue when trying to render the tool result in the subagent's tmux pane.

This is a rendering crash, not a connectivity crash. The MCP side is working; the terminal rendering side is not.

Config (relevant excerpt)

// .claude/settings.json
{
  "enabledPlugins": {
    "chrome-devtools-mcp@claude-plugins-official": true
  }
}

Environment

  • Platform: macOS 25.4.0 (Darwin)
  • Shell: zsh
  • Claude Code version: 2.1.119
  • Runtime: bun (/$bunfs/root/ path prefix in stack)
  • Session mode: bypassPermissions
  • Subagent spawned via Agent tool with subagent_type: "explorer"

View original on GitHub ↗

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