#spawn enametoolong

1 messages · Page 1 of 1 (latest)

full abyss
#

when using claude cli models it says 00:24:29 Embedded agent failed before reply: spawn ENAMETOOLONG (windows)

supple frigateBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

cold shuttleBOT
queen mortarBOT
#

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:

  1. First send:
openclaw --version
openclaw status --all
  1. 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
full abyss
#

| 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 |

queen mortarBOT
#

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:

  1. In that thread/session, run:
/context detail

and paste the biggest entries, especially injected files / skills / system prompt size.

  1. Temporarily test with a tiny clean workspace:
  • no big AGENTS.md
  • no BOOTSTRAP.md
  • no extra big context files