Summary
Several OpenClaw CLI commands hang indefinitely in their default text output path with no stdout/stderr, while their --json variants complete successfully. The gateway is healthy and responsive, so this appears to be a CLI text/bootstrap/rendering path issue rather than a gateway availability issue.
This looks related to the existing 2026.4.x CLI hang reports, especially #63249 and #62335, but this reproduction is on 2026.4.26 and specifically shows agents list --json working while agents list hangs.
Environment
- OpenClaw:
2026.4.26 (be8c246)
- OS: Debian GNU/Linux 13 (trixie), Linux VPS
- Install: npm global under user
octest, ~/.npm-global/bin/openclaw
- Node tested:
v24.15.0 / npm 11.12.1
v22.22.2 / npm 10.9.7
- Gateway: user systemd service, loopback
127.0.0.1:18789, active/running
- Gateway ExecStart:
/usr/bin/node --use-env-proxy /home/octest/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
- Network: outbound access through local mixed HTTP/SOCKS proxy at
127.0.0.1:2080; gateway service has HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY and Node --use-env-proxy
Homebrew was removed during diagnosis; Node is now from /usr/bin/node. The issue persisted across Homebrew removal and both Node 22 and Node 24 tests.
What works
openclaw --version
# OpenClaw 2026.4.26 (be8c246)
openclaw health
# completes, usually around 6s
openclaw agents --help
# completes, around 5s
openclaw agents list --json
# completes, around 5s, returns expected JSON
openclaw status --json --timeout 5000
# completes, around 6-9s, returns expected JSON
Gateway logs confirm the WS/RPC plane is responsive, e.g.:
[ws] ⇄ res ✓ health 841ms cached=true
[ws] ⇄ res ✓ channels.status 100ms
What hangs
These commands hang with zero stdout and zero stderr until killed by timeout:
timeout 60 openclaw agents list
# exit 124, 0 bytes stdout, 0 bytes stderr
timeout 60 openclaw agents
# exit 124, 0 bytes stdout, 0 bytes stderr
timeout 60 openclaw status --timeout 5000
# exit 124, 0 bytes stdout, 0 bytes stderr
On Node 24.15.0, earlier runs also showed default text openclaw status taking 70-90s or hanging, while status --json remained fast. On Node 22.22.2, text agents list and text status still hung, while JSON variants still worked.
Variants tested
These did not fix openclaw agents list text mode:
openclaw --no-color agents list
NO_COLOR=1 openclaw agents list
TERM=dumb openclaw agents list
COLUMNS=120 openclaw agents list
OPENCLAW_PLUGIN_DISCOVERY_CACHE_MS=600000 openclaw agents list
OPENCLAW_PLUGIN_DISCOVERY_CACHE_MS=600000 slightly improves health timing, but does not fix text command hangs.
Diagnostic notes
CLI bootstrap/plugin discovery cost
Even simple commands have a baseline 5-6s startup cost:
openclaw health ~5.8-6.1s
openclaw plugins registry --json ~5.9s
openclaw plugins list --json ~5.8s
openclaw plugins list --enabled --json ~5.5s
OPENCLAW_DISABLE_PERSISTED_PLUGIN_REGISTRY=1 made health slower (~7.6-7.8s), so the persisted registry is being used but does not avoid the heavy bootstrap.
strace observations
For openclaw health, strace showed the child CLI does significant bootstrap/import/plugin metadata work before the first connect to the gateway; after it connects, the gateway response is fast.
For openclaw agents list text mode:
- no stdout/stderr before timeout
- no gateway RPC appears necessary for the failing path
- process enters futex/worker waits / hot-loop-like behavior
- JSON path bypasses the hang and exits
Earlier status tracing showed repeated filesystem churn over bundled extension manifests/package metadata. In one run, each dist/extensions/*/openclaw.plugin.json was checked hundreds of times in a single status invocation.
Expected behavior
openclaw agents list should print the same logical information as openclaw agents list --json and exit promptly.
openclaw status text output should not hang when openclaw status --json succeeds and the gateway is healthy.
Actual behavior
Default text-output commands hang before printing anything, while JSON variants complete.
Related issues
Summary
Several OpenClaw CLI commands hang indefinitely in their default text output path with no stdout/stderr, while their
--jsonvariants complete successfully. The gateway is healthy and responsive, so this appears to be a CLI text/bootstrap/rendering path issue rather than a gateway availability issue.This looks related to the existing 2026.4.x CLI hang reports, especially #63249 and #62335, but this reproduction is on
2026.4.26and specifically showsagents list --jsonworking whileagents listhangs.Environment
2026.4.26 (be8c246)octest,~/.npm-global/bin/openclawv24.15.0/ npm11.12.1v22.22.2/ npm10.9.7127.0.0.1:18789, active/running/usr/bin/node --use-env-proxy /home/octest/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789127.0.0.1:2080; gateway service hasHTTP_PROXY,HTTPS_PROXY,ALL_PROXY,NO_PROXYand Node--use-env-proxyHomebrew was removed during diagnosis; Node is now from
/usr/bin/node. The issue persisted across Homebrew removal and both Node 22 and Node 24 tests.What works
Gateway logs confirm the WS/RPC plane is responsive, e.g.:
What hangs
These commands hang with zero stdout and zero stderr until killed by
timeout:On Node 24.15.0, earlier runs also showed default text
openclaw statustaking 70-90s or hanging, whilestatus --jsonremained fast. On Node 22.22.2, textagents listand textstatusstill hung, while JSON variants still worked.Variants tested
These did not fix
openclaw agents listtext mode:OPENCLAW_PLUGIN_DISCOVERY_CACHE_MS=600000slightly improveshealthtiming, but does not fix text command hangs.Diagnostic notes
CLI bootstrap/plugin discovery cost
Even simple commands have a baseline 5-6s startup cost:
OPENCLAW_DISABLE_PERSISTED_PLUGIN_REGISTRY=1made health slower (~7.6-7.8s), so the persisted registry is being used but does not avoid the heavy bootstrap.strace observations
For
openclaw health, strace showed the child CLI does significant bootstrap/import/plugin metadata work before the first connect to the gateway; after it connects, the gateway response is fast.For
openclaw agents listtext mode:Earlier
statustracing showed repeated filesystem churn over bundled extension manifests/package metadata. In one run, eachdist/extensions/*/openclaw.plugin.jsonwas checked hundreds of times in a single status invocation.Expected behavior
openclaw agents listshould print the same logical information asopenclaw agents list --jsonand exit promptly.openclaw statustext output should not hang whenopenclaw status --jsonsucceeds and the gateway is healthy.Actual behavior
Default text-output commands hang before printing anything, while JSON variants complete.
Related issues
openclaw statushangs after output