openclaw - 💡(How to fix) Fix Bug: profile=user (existing-session) fails on Android Termux - chrome-devtools-mcp stdin parent death [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#48867Fetched 2026-04-08 00:51:43
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

When using browser tool with profile=user on Android Termux, the chrome-devtools-mcp server connects successfully to the local Chromium instance but immediately exits with "Parent death detected (stdin end)", causing MCP error -32000: Connection closed.

Error Message

When using browser tool with profile=user on Android Termux, the chrome-devtools-mcp server connects successfully to the local Chromium instance but immediately exits with "Parent death detected (stdin end)", causing MCP error -32000: Connection closed.

Root Cause

The chrome-devtools-mcp server uses stdio transport to communicate with its parent process (OpenClaw Gateway). On Android Termux, when the Gateway spawns the MCP server, the stdin is not kept open, causing the MCP watchdog to detect "parent death" and trigger graceful shutdown.

This is confirmed by:

  1. Running chrome-devtools-mcp --wsEndpoint ws://... manually works (stays alive)
  2. The same binary fails when spawned via OpenClaw Gateway
  3. Log explicitly shows "Parent death detected (stdin end)"

Fix Action

Workaround

Currently using profile=openclaw (OpenClaw-managed browser) works fine, but this doesn't allow reusing existing login sessions from the user's daily Chromium.

Code Example

2026-03-17T08:38:31.303Z mcp:log Chrome DevTools MCP Server connected
2026-03-17T08:38:31.598Z mcp:log Watchdog started
2026-03-17T08:38:31.601Z mcp:log Parent death detected (stdin end). Sending shutdown event...
2026-03-17T08:38:33.872Z mcp:log Shutdown event sent. Exiting.
RAW_BUFFERClick to expand / collapse

Bug: profile=user (existing-session) fails on Android Termux with chrome-devtools-mcp "Connection closed"

Summary

When using browser tool with profile=user on Android Termux, the chrome-devtools-mcp server connects successfully to the local Chromium instance but immediately exits with "Parent death detected (stdin end)", causing MCP error -32000: Connection closed.

Environment

  • OS: Android 15 (Termux)
  • OpenClaw: Latest (npm global install)
  • Node: v22.x (via .openclaw-android/node)
  • Chromium: Termux X11 Chromium 146.0.7680.75
  • chrome-devtools-mcp: 0.20.0
  • Remote Debugging: Enabled at chrome://inspect/#remote-debugging, listening on ws://127.0.0.1:9222/devtools/browser/<id>

Reproduction Steps

  1. Start Chromium in Termux X11 with remote debugging enabled
  2. Run openclaw browser --browser-profile user status or use browser tool with profile=user
  3. Observe MCP connection failure

Expected Behavior

profile=user should attach to the existing Chromium session and allow browser control.

Actual Behavior

MCP server connects but immediately shuts down:

2026-03-17T08:38:31.303Z mcp:log Chrome DevTools MCP Server connected
2026-03-17T08:38:31.598Z mcp:log Watchdog started
2026-03-17T08:38:31.601Z mcp:log Parent death detected (stdin end). Sending shutdown event...
2026-03-17T08:38:33.872Z mcp:log Shutdown event sent. Exiting.

Root Cause Analysis

The chrome-devtools-mcp server uses stdio transport to communicate with its parent process (OpenClaw Gateway). On Android Termux, when the Gateway spawns the MCP server, the stdin is not kept open, causing the MCP watchdog to detect "parent death" and trigger graceful shutdown.

This is confirmed by:

  1. Running chrome-devtools-mcp --wsEndpoint ws://... manually works (stays alive)
  2. The same binary fails when spawned via OpenClaw Gateway
  3. Log explicitly shows "Parent death detected (stdin end)"

Proposed Fix

The Gateway should ensure stdin remains open when spawning stdio-based MCP servers, or use a different transport mechanism (e.g., WebSocket/server mode) for the existing-session profile.

Workaround

Currently using profile=openclaw (OpenClaw-managed browser) works fine, but this doesn't allow reusing existing login sessions from the user's daily Chromium.

Additional Context

  • This affects all Android Termux deployments where users want to reuse their existing Chromium login state
  • The chrome-devtools-mcp binary itself works correctly; the issue is purely in how it's spawned
  • Similar issues may exist on other platforms where process spawning differs from desktop Linux/macOS

extent analysis

Fix Plan

To fix the issue, we need to modify the OpenClaw Gateway to keep the stdin open when spawning the chrome-devtools-mcp server. Here are the steps:

  • Modify the OpenClaw Gateway to use a different transport mechanism, such as WebSocket/server mode, for the existing-session profile.
  • Update the openclaw browser command to use the new transport mechanism when profile=user is specified.

Example code changes:

// In openclaw-gateway.js
const spawn = require('child_process').spawn;

// ...

case 'user':
  // Use WebSocket/server mode for existing-session profile
  const mcpServer = spawn('chrome-devtools-mcp', ['--wsEndpoint', 'ws://127.0.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING