#spawn enametoolong
1 messages · Page 1 of 1 (latest)
Let me trace the Windows spawn path a bit more instead of guessing.
I checked the source, and this looks like a real Windows bug, not a bad Claude config.
claude-cli currently passes the whole OpenClaw system prompt as a single --append-system-prompt arg (extensions/anthropic/cli-backend.ts), and buildCliArgs() injects that directly into argv (src/agents/cli-runner/helpers.ts). On Windows, process creation has a much tighter command-line limit, so if your prompt/context is big enough, spawn dies with ENAMETOOLONG before Claude even starts.
What to try right now:
- First send:
openclaw --version
openclaw status --all
- Trim prompt/context size temporarily:
- shorten or move any big
AGENTS.md,BOOTSTRAP.md, workspace docs, or skills files - try from a shorter workspace path like
C:\oc\... - retry with less injected context
- Temporary fallback:
- use a non-CLI Anthropic provider, or another backend, until this is patched
If you want, paste the outputs plus a quick note on whether you have large workspace prompt files, and I’ll help narrow it down further.
Docs for the debug commands:
| Version | 2026.4.15 |
| OS | windows 10.0.26200 (x64) |
| Node | 22.22.0 |
| Config | ~.openclaw\openclaw.json |
| Dashboard | http://127.0.0.1:18789/ |
| Tailscale | off |
| Channel | stable (default) |
| Update | pnpm · up to date · npm latest 2026.4.15 |
| Gateway | local · ws://127.0.0.1:18789 (local loopback) · reachable 93ms · auth token · levit (192.168.4. |
| | 21) app 2026.4.15 windows 10.0.26200 |
| Security | Run: openclaw security audit --deep |
| Gateway self | unknown |
| Gateway service | Scheduled Task not installed |
| Node service | Scheduled Task not installed |
| Agents | 1 total · 1 bootstrapping · 0 active · 22 sessions |
| Secrets | none |
Nice, thanks, that rules out the usual “old version” problem.
The 1 bootstrapping bit is actually a clue here. Claude CLI only gets the big system prompt on the first run, and on Windows that first argv is exactly where ENAMETOOLONG would hit.
So my next two checks would be:
- In that thread/session, run:
/context detail
and paste the biggest entries, especially injected files / skills / system prompt size.
- Temporarily test with a tiny clean workspace:
- no big
AGENTS.md - no
BOOTSTRAP.md - no extra big context files