Windows Codex App: All automation tasks fail with exit code 1 (echo/dir produce no output)
What version of the Codex App are you using (From “About Codex” dialog)?
Codex App for Windows (latest version as of 2026-03-6)
What subscription do you have?
Third-party supplier
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
When running automation tasks in the Codex Windows GUI client, all tasks fail because the agent cannot execute any shell commands.
The automation task attempts to run simple commands such as:
echo
dir
However, every command exits with code 1 and produces no output.
Because of this, the agent cannot scan the repository or access files, and the automation fails immediately.
Example output from the automation run:
Automation: Small Targeted Refactor
Automation ID: small-targeted-refactor
Look through the codebase for a potential small targeted refactor and do it.
Result:
All commands returned exit code: 1 with no output.
The automation reports that it cannot scan the repository or read files because even basic commands like echo or dir fail.
As a result, every automation task fails before doing any work.
What steps can reproduce the bug?
- Open the Codex Windows GUI application.
- Open a project repository.
- Run any automation task (for example "Small Targeted Refactor").
- The automation begins execution.
- The agent attempts to run simple shell commands (echo, dir, etc.).
- All commands return exit code 1 with no output.
Result:
The automation cannot read the repository or run any commands and stops with an error. Terminal tool anomaly: functions.shell_command returns exit code 1 for all commands
What is the expected behavior?
The automation task should be able to execute basic shell commands such as:
echo
dir
These commands should return normal output and allow the agent to scan the repository, read files, and perform the requested automation task.
Automation tasks should complete successfully instead of failing immediately.
Additional information
This issue appears to affect all automation tasks in the Windows GUI client.
The problem occurs even when running very simple commands such as echo or dir.
It looks like the automation environment cannot execute shell commands at all, which prevents the agent from accessing the repository.
Additional observation:
If I click "Open Thread" after the automation fails and then ask the agent to continue (for example by typing "continue"), the agent is able to execute shell commands successfully.
In that case, commands like:
echo
dir
start working normally and return proper output.
This suggests that the shell environment itself is functional, but the initial automation execution environment may not be correctly initialized.
So the issue seems to occur only during the initial automation run, while the interactive thread environment works as expected.
If needed, I can provide additional logs or a minimal test repository.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
After checking, none of them should be duplicates
This issue exists on Mac. System is good at detecting potential duplicates but should streamline the fix.
I am having this issue with the VSCode extension. I don't see a button to "Open Thread." However, having it elevate for the commands fixes it for me.
#13234
I tried running the following commands manually from both
pwshandcmd:Both worked. When Codex unelevated in VSCode tried running
Get-Content 'some_file', it got:Codex also tried all of the following commands:
and got the same results: no output, exit code 1.
Codex tells me this is likely an issue with the
shell_commandtool itself when it runs unelevated. I don't know this software but it seems plausible.