You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--ask-for-approval never on Windows still requires approvals #2350
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
Reacted by mikus234, Josh LeBlanc, Pavle Dujkic, pfilbin90, NetScale, ILindsley, Shane Zarechian, Lulu, Przemysław Kłys, s2005 and 1 more
Reacted by Eduardo Fernando, ILindsley, Shane Zarechian, Lulu and Przemysław Kłys
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:
The get_platform_sandbox function checks the operating system. It currently only recognizes macOS and Linux. When the code runs on Windows, the function returns None:
Even when you use --dangerously-bypass-approvals-and-sandbox the 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_safety to return AutoApprove when sandbox_policy is DangerFullAccess, regardless of platform sandbox availability.
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
Activity
pavledujkic commentedon Aug 17, 2025
It will also always ask for permission for edits when it is set to
--dangerously-bypass-approvals-and-sandbox.eliasjz36 commentedon Aug 17, 2025
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:
codex/codex-rs/core/src/safety.rs
Lines 51 to 56 in 71cae06
The
get_platform_sandboxfunction checks the operating system. It currently only recognizes macOS and Linux. When the code runs on Windows, the function returnsNone:codex/codex-rs/core/src/safety.rs
Lines 162 to 170 in 71cae06
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.[-]Workspace Autonomy[/-][+]--ask-for-approval never on Windows still requires approvals[/+]pfilbin90 commentedon Aug 18, 2025
This is happening for me as well version 0.22.0 and Windows 11.
zero-stroke commentedon Aug 21, 2025
This makes it kind of unusable, can't sit and babysit it
al-labs commentedon Aug 21, 2025
I'm experiencing as well: version 0.22.0 and Windows 11.
lulu-sk commentedon Aug 21, 2025
我也遇到了:版本 0.230 和 Windows 11
pablovela5620 commentedon Aug 26, 2025
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
pakrym-oai commentedon Sep 7, 2025
Fixed in 0.30