-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Description
What version of Codex is running?
0.77.0
What subscription do you have?
no subscription
Which model were you using?
custom
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
The force delete functionality behaves inconsistently between Windows and Linux platforms when --ask-for-approval on-request is configured. On Windows, the operation executes without requesting user confirmation, while on Linux, a similar force delete operation (rm -rf) properly prompts for approval.
If such commands are executed without an explicit user confirmation step, the system may delete these files directly, increasing the risk of accidental or unintended file loss.
What steps can reproduce the bug?
Windows Platform:
-
Create a test directory structure:
mkdir test echo "content" > test/test.txt
-
Make test.txt read-only:
attrib +r test/test.txt
-
Verify that direct deletion is blocked (without admin privileges):
cd test rm test.txt # Expected: Error - "You do not have sufficient access rights to perform this operation" -
Run codex with
-a on-requestand tell it to remove the testcd .. codex -a on-request› delete the test folder • I'll help you delete the test folder. Let me first check what's in the current directory and then remove the test folder. • Ran Get-ChildItem -Force └ … +8 lines ─ Worked for 4s ──────────────────────────────────────────────────────────────────────────────────────────────────────── • Ran Remove-Item -Path 'test' -Recurse -Force └ (no output) ─ Worked for 6s ──────────────────────────────────────────────────────────────────────────────────────────────────────── • Ran Get-ChildItem -Force └ … +7 lines ```
What is the expected behavior?
ask user to approval before execute the command
Additional information
No response