Skip to content

Unusable on Windows due to permission ask for every shell command #2860

@vthorsteinsson

Description

@vthorsteinsson

What version of Codex is running?

codex-cli 0.25.0

Which model were you using?

gpt-5

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

Simply use Codex in a basic way on Windows. It uses PowerShell for almost all operations (reading file contents, searching for files, enumerating directories) and asks for permission for every operation. Telling it to stop asking for permission has no effect.

Here is a screenshot example:

Image

What is the expected behavior?

It should be able to perform basic harmless operations within the current directory and its subdirectories, such as reading files, scanning directories, and searching for text without asking permission for each operation.

Also, explicitly prefixing every operation with "powershell -NoProfile -Command ..." is fairly weird.

What do you see instead?

✔ You approved codex to run powershell -NoProfile -Command 'rg -n -S -e "gamelist" -e "recentlist" -e "recentList" -e "gameList"
src' this time
  ✓ ⌨️ powershell -NoProfile -Command 'rg -n -S -e "gamelist" -e "recentlist" -e "recentList" -e "gameList" src'

✔ You approved codex to run powershell -NoProfile -Command 'Write-Output "Opening gameListSlice.ts to inspect fetch functions
and triggers."; Get-Content -TotalCount 350 src/stores/slices/gameListSlice.ts' this time
  ✓ ⌨️ powershell -NoProfile -Command 'Write-Output "Opening gameListSlice.ts to inspect fetch functions and triggers.";
Get-Content -TotalCount 350 src/stores/slices/gameListSlice.ts'

✔ You approved codex to run powershell -NoProfile -Command 'Get-Content src/stores/slices/gameListSlice.ts -TotalCount 1000 |
Select-Object -Index 0..999' this time
  ✗ ⌨️ powershell -NoProfile -Command 'Get-Content src/stores/slices/gameListSlice.ts -TotalCount 1000 | Select-Object -Index
0..999'
    Select-Object : Cannot bind parameter 'Index'. Cannot convert value "0..999" to type "System.Int32". Error: "Input string
was n
    ot in a correct format."
    At line:1 char:88
    + ... lices/gameListSlice.ts -TotalCount 1000 | Select-Object -Index 0..999
    +                                                                    ~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Select-Object], ParameterBindingException
        + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.SelectObjectCommand


✔ You approved codex to run powershell -NoProfile -Command '(Get-Content src/stores/slices/gameListSlice.ts -Raw)' this time
  ✓ ⌨️ powershell -NoProfile -Command '(Get-Content src/stores/slices/gameListSlice.ts -Raw)'

✔ You approved codex to run powershell -NoProfile -Command '$content = Get-Content -Raw src/stores/slices/gameListSlice.ts;
$content.IndexOf('"'loadAllGameLists'); "'$content.Substring(0, [Math]::Min($content.Length, 2000))' this time
  ✓ ⌨️ powershell -NoProfile -Command '$content = Get-Content -Raw src/stores/slices/gameListSlice.ts;
$content.IndexOf('"'loadAllGameLists'); "'$content.Substring(0, [Math]::Min($content.Length, 2000))'
? Codex wants to run powershell -NoProfile -Command '$content = Get-Content -Raw src/stores/slices/gameListSlice.ts; $start =
$content.IndexOf('"'loadAllGameLists'); "'$content.Substring($start, [Math]::Min(2400, $content.Length - $start))'

▌Allow command?
▌ Yes   Always   No, provide feedback
▌ Approve and run the command    

Additional information

Unfortunately Codex-cli is unusable on Windows like this.

As an aside, I am using Claude Code extensively and Gemini-cli occasionally on the same Windows setup, and they work fine.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows-osIssues related to Codex on Windows systems

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions