openclaw - 💡(How to fix) Fix [Bug]: 2026.5.18 Codex Chrome DevTools MCP sidecars accumulate under gateway and drive cgroup memory growth

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…

On OpenClaw 2026.5.18, gateway memory growth appears to be driven mostly by unreaped Codex tool sidecars rather than the gateway Node process heap. Repeated embedded Codex sessions spawn multiple chrome-devtools-mcp trees with the same command/profile. Those children remain alive for hours under the gateway service cgroup and accumulate memory until a full gateway restart clears them.

This is related to, but not the same as, #75621 and #65983:

  • #75621 covers duplicate persistent stdio MCP children spawned by the gateway lazy-load path for the same config.
  • #65983 covers background PTY exec runs surviving restart/session loss.
  • This report is specifically about openai-codex/gpt-5.5 embedded runs / Codex app-server spawning repeated chrome-devtools-mcp sidecars that are not reclaimed while the gateway remains running.

Root Cause

On OpenClaw 2026.5.18, gateway memory growth appears to be driven mostly by unreaped Codex tool sidecars rather than the gateway Node process heap. Repeated embedded Codex sessions spawn multiple chrome-devtools-mcp trees with the same command/profile. Those children remain alive for hours under the gateway service cgroup and accumulate memory until a full gateway restart clears them.

This is related to, but not the same as, #75621 and #65983:

  • #75621 covers duplicate persistent stdio MCP children spawned by the gateway lazy-load path for the same config.
  • #65983 covers background PTY exec runs surviving restart/session loss.
  • This report is specifically about openai-codex/gpt-5.5 embedded runs / Codex app-server spawning repeated chrome-devtools-mcp sidecars that are not reclaimed while the gateway remains running.

Code Example

OpenClaw 2026.5.18 (50a2481)
Gateway under Linux user systemd
Default model/runtime: openai-codex/gpt-5.5 via Codex app-server
Gateway unit KillMode=control-group

---

$ systemctl --user show openclaw-gateway.service -p MainPID -p MemoryCurrent -p MemoryPeak -p TasksCurrent -p KillMode
MainPID=2284868
MemoryCurrent=3272093696
MemoryPeak=4643762176
TasksCurrent=232
KillMode=control-group

$ ps -eo pid,ppid,rss,pmem,etime,cmd --sort=-rss | head
PID      PPID   RSS   %MEM  ELAPSED CMD
2284868  1146   801092 9.8  10:57:03 node ... openclaw ... gateway --port 18789
...

---

$ ps -eo rss,cmd | awk '/chrome-devtools-mcp|npm exec chrome-devtools-mcp|codex app-server/ && !/awk/ {sum+=$1; n++} END {printf "count=%d rss_mib=%.1f\n", n, sum/1024}
count=26 rss_mib=2414.5

$ ps -eo rss,cmd | awk '/chrome-devtools-mcp/ && !/npm exec/ && !/awk/ {sum+=$1; n++} END {printf "mcp_servers=%d rss_mib=%.1f\n", n, sum/1024}
mcp_servers=16 rss_mib=1437.0

---

2285629 2285524 98464 39670 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2285706 2285705 181100 39669 chrome-devtools-mcp
2287180 2285524 99056 38632 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2287266 2287265 181104 38631 chrome-devtools-mcp
2289992 2289879 98204 36273 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2290075 2290074 182876 36271 chrome-devtools-mcp
2320902 2285524 97900 1174 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2320988 2320987 182272 1171 chrome-devtools-mcp
2321064 2285524 98044 1160 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321151 2321150 182416 1158 chrome-devtools-mcp
2321244 2285524 97068 1153 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321329 2321328 180944 1152 chrome-devtools-mcp
2321455 2285524 97676 1101 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321554 2285524 96980 1100 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321602 2321601 181984 1100 chrome-devtools-mcp
2321677 2321676 182600 1098 chrome-devtools-mcp

---

node ... openclaw ... gateway --port 18789
  |-node ... codex.js app-server --listen stdio://
  |   |-codex app-server --listen stdio://
  |   |   |-npm exec chrome-devtools-mcp@latest ...
  |   |   |   `-chrome-devtools-mcp
  |   |   |-npm exec chrome-devtools-mcp@latest ...
  |   |   |   `-chrome-devtools-mcp
  |   |   `- ... repeated ...

---

[agent/embedded] strict-agentic execution contract active: runId=... provider=openai-codex/gpt-5.5 harness=codex
... repeated across scheduled and Telegram sessions ...
[plugins] memory-core: managed dreaming cron could not be reconciled (cron service unavailable).
[agent/embedded] strict-agentic execution contract active: runId=dreaming-narrative-light-... provider=openai-codex/gpt-5.5 harness=codex
[agent/embedded] strict-agentic execution contract active: runId=dreaming-narrative-rem-... provider=openai-codex/gpt-5.5 harness=codex
[agent/embedded] strict-agentic execution contract active: runId=dreaming-narrative-deep-... provider=openai-codex/gpt-5.5 harness=codex
[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu eventLoopDelayP99Ms=1185.9 eventLoopDelayMaxMs=2434.8 eventLoopUtilization=0.96 cpuCoreRatio=1.028 active=2 ...
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.5.18, gateway memory growth appears to be driven mostly by unreaped Codex tool sidecars rather than the gateway Node process heap. Repeated embedded Codex sessions spawn multiple chrome-devtools-mcp trees with the same command/profile. Those children remain alive for hours under the gateway service cgroup and accumulate memory until a full gateway restart clears them.

This is related to, but not the same as, #75621 and #65983:

  • #75621 covers duplicate persistent stdio MCP children spawned by the gateway lazy-load path for the same config.
  • #65983 covers background PTY exec runs surviving restart/session loss.
  • This report is specifically about openai-codex/gpt-5.5 embedded runs / Codex app-server spawning repeated chrome-devtools-mcp sidecars that are not reclaimed while the gateway remains running.

Environment

OpenClaw 2026.5.18 (50a2481)
Gateway under Linux user systemd
Default model/runtime: openai-codex/gpt-5.5 via Codex app-server
Gateway unit KillMode=control-group

Observed memory shape

After a full gateway restart, the service cgroup was about 1.9 GiB. Roughly 11 hours later it had grown into the 3-4+ GiB range. The main gateway Node process was not the primary consumer.

Recent snapshot:

$ systemctl --user show openclaw-gateway.service -p MainPID -p MemoryCurrent -p MemoryPeak -p TasksCurrent -p KillMode
MainPID=2284868
MemoryCurrent=3272093696
MemoryPeak=4643762176
TasksCurrent=232
KillMode=control-group

$ ps -eo pid,ppid,rss,pmem,etime,cmd --sort=-rss | head
PID      PPID   RSS   %MEM  ELAPSED CMD
2284868  1146   801092 9.8  10:57:03 node ... openclaw ... gateway --port 18789
...

The gateway process itself was ~782 MiB RSS, while Codex/Chrome DevTools related children accounted for most of the rest.

$ ps -eo rss,cmd | awk '/chrome-devtools-mcp|npm exec chrome-devtools-mcp|codex app-server/ && !/awk/ {sum+=$1; n++} END {printf "count=%d rss_mib=%.1f\n", n, sum/1024}
count=26 rss_mib=2414.5

$ ps -eo rss,cmd | awk '/chrome-devtools-mcp/ && !/npm exec/ && !/awk/ {sum+=$1; n++} END {printf "mcp_servers=%d rss_mib=%.1f\n", n, sum/1024}
mcp_servers=16 rss_mib=1437.0

Process evidence

Multiple chrome-devtools-mcp invocations remain alive under the Codex app-server / gateway process tree. Several use the same executable, same user data dir, same viewport, and same flags. Some had been alive for 10+ hours; others appeared in a cluster about 18-20 minutes before the snapshot.

Representative ps output:

2285629 2285524 98464 39670 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2285706 2285705 181100 39669 chrome-devtools-mcp
2287180 2285524 99056 38632 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2287266 2287265 181104 38631 chrome-devtools-mcp
2289992 2289879 98204 36273 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2290075 2290074 182876 36271 chrome-devtools-mcp
2320902 2285524 97900 1174 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2320988 2320987 182272 1171 chrome-devtools-mcp
2321064 2285524 98044 1160 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321151 2321150 182416 1158 chrome-devtools-mcp
2321244 2285524 97068 1153 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321329 2321328 180944 1152 chrome-devtools-mcp
2321455 2285524 97676 1101 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321554 2285524 96980 1100 npm exec chrome-devtools-mcp@latest --headless --executablePath=/usr/bin/google-chrome --userDataDir=<openclaw-browser-profile>/chrome-devtools-mcp --viewport=1365x768 --no-usage-statistics --no-performance-crux --redactNetworkHeaders
2321602 2321601 181984 1100 chrome-devtools-mcp
2321677 2321676 182600 1098 chrome-devtools-mcp

The parent tree shows these under the Codex app-server, not as independently managed systemd units:

node ... openclaw ... gateway --port 18789
  |-node ... codex.js app-server --listen stdio://
  |   |-codex app-server --listen stdio://
  |   |   |-npm exec chrome-devtools-mcp@latest ...
  |   |   |   `-chrome-devtools-mcp
  |   |   |-npm exec chrome-devtools-mcp@latest ...
  |   |   |   `-chrome-devtools-mcp
  |   |   `- ... repeated ...

Concurrent log pattern

The gateway is repeatedly starting embedded Codex runs throughout the process lifetime. A memory-core dreaming pass also briefly stacked multiple embedded runs and produced event-loop pressure, although the persistent footprint is the unreaped sidecars.

[agent/embedded] strict-agentic execution contract active: runId=... provider=openai-codex/gpt-5.5 harness=codex
... repeated across scheduled and Telegram sessions ...
[plugins] memory-core: managed dreaming cron could not be reconciled (cron service unavailable).
[agent/embedded] strict-agentic execution contract active: runId=dreaming-narrative-light-... provider=openai-codex/gpt-5.5 harness=codex
[agent/embedded] strict-agentic execution contract active: runId=dreaming-narrative-rem-... provider=openai-codex/gpt-5.5 harness=codex
[agent/embedded] strict-agentic execution contract active: runId=dreaming-narrative-deep-... provider=openai-codex/gpt-5.5 harness=codex
[diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu eventLoopDelayP99Ms=1185.9 eventLoopDelayMaxMs=2434.8 eventLoopUtilization=0.96 cpuCoreRatio=1.028 active=2 ...

Expected behavior

Chrome DevTools MCP sidecars spawned for a Codex embedded run should either:

  1. be reused by a bounded shared pool keyed by MCP config/profile, or
  2. be terminated when the embedded run/session that started them ends.

The number of live chrome-devtools-mcp processes should not grow monotonically with embedded runs.

Actual behavior

Repeated embedded Codex sessions leave behind multiple identical chrome-devtools-mcp process trees. They persist for hours, accumulate >1 GiB RSS by themselves, and drive openclaw-gateway.service cgroup memory growth even though the main gateway Node process is much smaller.

Operational impact

  • Gateway service memory grows back after a restart.
  • Full gateway restart clears the accumulated children.
  • Memory-watch alerts fire even though the main gateway process is not the main consumer.
  • Event-loop delay/liveness warnings appear during stacked embedded runs, making the system more fragile under scheduled work.

Suggested investigation

  • Check Codex app-server MCP lifecycle ownership: are MCP child processes registered against the embedded run/session and disposed on completion?
  • Check whether repeated chrome-devtools-mcp launches with identical command/profile should dedupe via a shared in-flight/live child map.
  • Add lifecycle logging for MCP sidecar spawn/reuse/dispose under Codex embedded runs.
  • Consider a bounded sidecar reaper or orphan sweep for children still under the gateway cgroup but no longer associated with live sessions.

A restart is an acceptable emergency reset, but this should not require routine service restarts to keep the cgroup from growing.

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…

FAQ

Expected behavior

Chrome DevTools MCP sidecars spawned for a Codex embedded run should either:

  1. be reused by a bounded shared pool keyed by MCP config/profile, or
  2. be terminated when the embedded run/session that started them ends.

The number of live chrome-devtools-mcp processes should not grow monotonically with embedded runs.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: 2026.5.18 Codex Chrome DevTools MCP sidecars accumulate under gateway and drive cgroup memory growth