Crashes out when trying to run git status

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

Not sure of the best way to report this, but hopefully this trace is enough. Was having o4-mini fix some issues with a 3rd party android repo, and it was wrapping up.

    command

    $ 'git status' --short

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Shell Command                                                                                                                                                                                                                                                                           │
│                                                                                                                                                                                                                                                                                        │
│$ 'git status' --short                                                                                                                                                                                                                                                                  │
│                                                                                                                                                                                                                                                                                        │
│Allow command?                                                                                                                                                                                                                                                                          │
│                                                                                                                                                                                                                                                                                        │
│  ❯ Yes (y) ✔                                                                                                                                                                                                                                                                           │
│    Yes, always approve this exact command for this session (a)                                                                                                                                                                                                                         │
│    Edit or give feedback (e)                                                                                                                                                                                                                                                           │
│    No, and keep going (n)                                                                                                                                                                                                                                                              │
│    No, and stop for now (esc)                                                                                                                                                                                                                                                          │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
node:events:485
      throw er; // Unhandled 'error' event
      ^

Error: spawn git status ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn git status',
  path: 'git status',
  spawnargs: [ '--short' ]
}

Node.js v23.7.0
zzz

View original on GitHub ↗

3 Comments

donutdan4114 · 1 year ago
tibo-openai collaborator · 1 year ago

Seems that the model generated 'git status' as a single command, but it should have been plainly git status --short. Should make this more resilient and retry when that happens.

tibo-openai collaborator · 1 year ago

Should be fixed by https://github.com/openai/codex/pull/79, we'll cut a new release shortly.