Bug: spawn EBADF error on all exec tool calls
Environment:
- macOS 15.6.0 (arm64) — Mac mini
- Clawdbot 2026.1.24-3
- Tested on Node v25.4.0 and v22.x (same issue on both)
- exec config:
security: "full", ask: "off"
Problem:
The exec tool fails with spawn EBADF on every command. Browser tool works fine (can start Chrome, navigate, etc.), but any exec call fails immediately.
Error from gateway logs (verbose mode):
[exec] spawn failed (spawn EBADF syscall=spawn errno=-9); retrying with no-detach.
tools: exec failed stack: Error: spawn EBADF
at ChildProcess.spawn (node:internal/child_process:420:11)
at spawn (node:child_process:796:9)
at spawnAndWaitForSpawn (file:///...clawdbot/dist/process/spawn-utils.js:28:19)
at spawnWithFallback (file:///...clawdbot/dist/process/spawn-utils.js:78:33)
at runExecProcess (file:///...clawdbot/dist/agents/bash-tools.exec.js:284:36)
What I've tried (none fixed it):
- Machine reboot
- Gateway restart (
pkill -f clawdbot-gateway && clawdbot gateway start)
- npm update/reinstall (
npm uninstall -g clawdbot && npm install -g clawdbot)
- Downgrading from Node 25 to Node 22 LTS
- Clearing
/tmp/clawdbot-*
Key observation:
Node itself spawns fine:
node -e "require('child_process').execSync('echo hello', {stdio:'inherit'})"
# Output: hello
So the issue is specific to how Clawdbot's spawn-utils.js calls spawn, not a system-level problem.
Bug:
spawn EBADFerror on all exec tool callsEnvironment:
security: "full",ask: "off"Problem:
The exec tool fails with
spawn EBADFon every command. Browser tool works fine (can start Chrome, navigate, etc.), but any exec call fails immediately.Error from gateway logs (verbose mode):
What I've tried (none fixed it):
pkill -f clawdbot-gateway && clawdbot gateway start)npm uninstall -g clawdbot && npm install -g clawdbot)/tmp/clawdbot-*Key observation:
Node itself spawns fine:
So the issue is specific to how Clawdbot's
spawn-utils.jscalls spawn, not a system-level problem.