Shell cmds not working
Resolved 💬 6 comments Opened Apr 27, 2025 by gitmeatarru Closed Aug 7, 2025
💡 Likely answer: A maintainer (PramaYudhistira, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.1.2504251709
Which model were you using?
gpt-4.1-nano
What platform is your computer?
windows 11 x64
What steps can reproduce the bug?
in this directory i have file hello.html with some code and i just ask codex explain how it works and get this:
user
explain this codebase to me
command
$ rg --json def
command.stdout (code: 1, duration: 0s)
Error: spawn rg ENOENT
command
$ find . -name \*.py
command.stdout (code: 2, duration: 0s)
�� ������ ����: *.py
command
$ ls -la
command.stdout (code: 1, duration: 0s)
Error: spawn dir ENOENT
command
$ ls -la
command.stdout (code: 1, duration: 0s)
Error: spawn dir ENOENT
command
$ ls -la
command.stdout (code: 1, duration: 0s)
Error: spawn dir ENOENT
codex
It appears that commands to list or search files in the workspace are not working properly.
Could you please confirm if you have uploaded or cloned the codebase here? Or if you
provide me with some files or folder names, I can try to analyze them to explain the
codebase to you.
user
hello.html
command
$ head -40 hello.html
command.stdout (code: 1, duration: 0s)
Error: spawn head ENOENT
codex
It seems basic shell commands are not working properly here. Could you please upload or
paste the content of the file hello.html so I can analyze it and explain the codebase to
you?
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
6 Comments
I have a potential fix https://github.com/openai/codex/pull/688 . This seems to happen a lot with PowerShell
I am macos zsh iterm2 user and am facing this issue. same version
facing the same issue for any command on ubuntu 22.04 -
!Image
same issue on my windows computer as well..
!Image
Thank you for the feedback! Please try using the latest version of Codex CLI, as we are actively addressing issues and improving stability. If the problem persists, feel free to reach out again.
I am having this issue on linux and am using the latest version