When trying to work with it, I get the errors and the app crashes.

Resolved 💬 3 comments Opened Apr 16, 2025 by piotrsynowiec Closed Apr 16, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator) responded on this thread — see the highlighted reply below.

node:internal/child_process:420
throw new ErrnoException(err, 'spawn');
^

Error: spawn ENAMETOOLONG
at ChildProcess.spawn (node:internal/child_process:420:11)
at spawn (node:child_process:762:9)
at WI (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:362:744)
at pte (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:435:228)
at SN (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:435:1810)
at async Ate (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:435:1111)
at async I0.handleFunctionCall (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:459:3890)
at async I0.processEventsWithoutStreaming (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:460:4436)
at async I0.run (file:///Users/piotr/.nvm/versions/node/v20.18.2/lib/node_modules/@openai/codex/dist/cli.js:460:2762) {
errno: -63,
code: 'ENAMETOOLONG',
syscall: 'spawn'
}

View original on GitHub ↗

3 Comments

kelin1003 · 1 year ago

I'm facing this one too.
At times, it fails with Error: spawn rg --files ENOENT. Then sometimes it works but fails with Error: spawn ENAMETOOLONG

kelin1003 · 1 year ago

It worked when I use the following command:
codex -m o4-mini-2025-04-16

tibo-openai collaborator · 1 year ago

Should be fixed