[Bug]: 现象1:对话框输入一次,会显示两个重复的内容 现象2:agent和subagent运行中网关超时无法启动,需要退出openclaw重启才能恢复
Summary
[2026-04-02T09:27:19.641Z] [INFO ] [metric] gateway.reconnect { "outcome": "failure", "attemptNo": 1, "maxAttempts": 10, "delayMs": 1000, "gateway_reconnect_success_count": 0, "gateway_reconnect_attempt_count": 2, "gateway_reconnect_success_rate": 0, "error": "Port 18789 still occupied after 30000ms" } [2026-04-02T09:27:19.641Z] [WARN ] Scheduling Gateway reconnect attempt 1/10 in 1000ms [2026-04-02T09:27:20.646Z] [INFO ] Gateway start requested (port=18789) [2026-04-02T09:27:22.942Z] [INFO ] Waiting for port 18789 to become available (Windows TCP TIME_WAIT)... [2026-04-02T09:27:53.118Z] [ERROR] Port 18789 still occupied after 30000ms; aborting startup to avoid port conflict [2026-04-02T09:27:53.118Z] [WARN ] Transient start error: Error: Port 18789 still occupied after 30000ms. Retrying... (1/3) [2026-04-02T09:27:56.345Z] [INFO ] Waiting for port 18789 to become available (Windows TCP TIME_WAIT)...
Steps to Reproduce
- 启动多agetn协作或者多对话一会就会gateway超时 无法恢复,需要重启clawx
Expected Behavior
能正常完成任务
Actual Behavior
网关超时无法恢复
Environment
-win 10 64bit -clawx v0.3.4
Logs or Screenshots
[2026-04-02T09:28:59.898Z] [ERROR] Port 18789 still occupied after 30000ms; aborting startup to avoid port conflict
[2026-04-02T09:28:59.898Z] [ERROR] Gateway start failed (port=18789, reconnectAttempts=0, spawn=n/a) Port 18789 still occupied after 30000ms
Error: Port 18789 still occupied after 30000ms
at Fs (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:22:3349)
at async Object.waitForPortFree (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:11224)
at async xd (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:7080)
at async qe.start (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:10639)
at async Timeout._onTimeout (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:24145)
[2026-04-02T09:28:59.898Z] [ERROR] Gateway reconnection attempt failed: Port 18789 still occupied after 30000ms
Error: Port 18789 still occupied after 30000ms
at Fs (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:22:3349)
at async Object.waitForPortFree (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:11224)
at async xd (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:7080)
at async qe.start (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:10639)
at async Timeout._onTimeout (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:24145)
[2026-04-02T09:28:59.898Z] [INFO ] [metric] gateway.reconnect {
"outcome": "failure",
"attemptNo": 1,
"maxAttempts": 10,
"delayMs": 1000,
"gateway_reconnect_success_count": 0,
"gateway_reconnect_attempt_count": 3,
"gateway_reconnect_success_rate": 0,
"error": "Port 18789 still occupied after 30000ms"
}
[2026-04-02T09:28:59.898Z] [WARN ] Scheduling Gateway reconnect attempt 1/10 in 1000ms
[2026-04-02T09:29:00.909Z] [INFO ] Gateway start requested (port=18789)
[2026-04-02T09:29:03.212Z] [INFO ] Waiting for port 18789 to become available (Windows TCP TIME_WAIT)...
[2026-04-02T09:29:33.439Z] [ERROR] Port 18789 still occupied after 30000ms; aborting startup to avoid port conflict
[2026-04-02T09:29:33.440Z] [WARN ] Transient start error: Error: Port 18789 still occupied after 30000ms. Retrying... (1/3)
[2026-04-02T09:29:36.642Z] [INFO ] Waiting for port 18789 to become available (Windows TCP TIME_WAIT)...
[2026-04-02T09:30:06.835Z] [ERROR] Port 18789 still occupied after 30000ms; aborting startup to avoid port conflict
[2026-04-02T09:30:06.835Z] [WARN ] Transient start error: Error: Port 18789 still occupied after 30000ms. Retrying... (2/3)
[2026-04-02T09:30:10.084Z] [INFO ] Waiting for port 18789 to become available (Windows TCP TIME_WAIT)...
[2026-04-02T09:30:40.298Z] [ERROR] Port 18789 still occupied after 30000ms; aborting startup to avoid port conflict
[2026-04-02T09:30:40.298Z] [ERROR] Gateway start failed (port=18789, reconnectAttempts=0, spawn=n/a) Port 18789 still occupied after 30000ms
Error: Port 18789 still occupied after 30000ms
at Fs (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:22:3349)
at async Object.waitForPortFree (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:11224)
at async xd (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:7080)
at async qe.start (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:10639)
at async Timeout._onTimeout (D:\install\ClawX\resources\app.asar\dist-electron\main\index.js:92:24145)
[2026-04-02T09:30:40.298Z] [ERROR] Gateway reconnection attempt failed: Port 18789 still occupied after 30000ms
Error: Port 18789 still occupied after 30000msPre-Submission Checklist
- I searched existing issues and did not find a duplicate.
- I can reproduce this issue on the latest main branch build.
Source: ValueCell-ai/ClawX