--ask-for-approval never on Windows still requires approvals
Resolved 💬 8 comments Opened Aug 15, 2025 by ElierHG Closed Sep 7, 2025
💡 Likely answer: A maintainer (pakrym-oai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.20.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?
Opening codex with codex --ask-for-approval never --sandbox workspace-write does not give it access to apply all changes, it ask for permission every time it is writing to a file.
What is the expected behavior?
Run all commands and edit any files in the workspace without any permission requests.
What do you see instead?
_No response_
Additional information
_No response_
8 Comments
It will also always ask for permission for edits when it is set to
--dangerously-bypass-approvals-and-sandbox.I think that happens in Windows because there's no sandbox backend to enforce constraints. The CLI prompts the user for approval if it doesn't find a platform:
https://github.com/openai/codex/blob/71cae06e6643b4adf644d9769208c3c5fcd1f2be/codex-rs/core/src/safety.rs#L51-L56
The
get_platform_sandboxfunction checks the operating system. It currently only recognizes macOS and Linux. When the code runs on Windows, the function returnsNone:https://github.com/openai/codex/blob/71cae06e6643b4adf644d9769208c3c5fcd1f2be/codex-rs/core/src/safety.rs#L162-L170
Even when you use
--dangerously-bypass-approvals-and-sandboxthe same thing happens.You can run it in WSL to solve this. One possible solution to run it in Windows is to modify
assess_patch_safetyto returnAutoApprovewhensandbox_policyisDangerFullAccess, regardless of platform sandbox availability.This is happening for me as well version 0.22.0 and Windows 11.
This makes it kind of unusable, can't sit and babysit it
I'm experiencing as well: version 0.22.0 and Windows 11.
我也遇到了:版本 0.230 和 Windows 11
Is there any workaround for this without having to modify the source like @eliasjz36 recommends? I'm using vibe-kanban, and it's basically unusable if I have to consistently give permissions
Fixed in 0.30