Codex (ChatGPT’s coding agent) in read-only mode on Windows blocks writes but still lets del delete files. Bug, or something we’re missing?
retained text
We were testing Codex’s sandbox on Windows while building Hellhound, our Windows app that runs Codex, and found something we can’t explain. We reproduced it with Codex’s own `codex sandbox` command, without our app. In read-only mode, in a folder with one file, existing.txt: * `echo hello> created.txt` is blocked (good) * `echo changed> existing.txt` is blocked (good) * `del /f /q existing.txt` deletes the file What we saw, by `windows.sandbox` setting: * **unelevated:** file deleted * **not set:** file deleted * **elevated:** not deleted * **mxc:** not deleted PowerShell’s `Remove-Item` couldn’t delete it in any of the four. Only cmd’s `del` got through. Codex 0.162.1, Windows 11. The closest thing we found on Codex’s GitHub is issue #32915: in the legacy (unelevated) sandbox, files can be deleted because of the user’s FILE\_DELETE\_CHILD permission on the parent folder. That report is about workspace-write, though, not read-only, and we haven’t proven it’s the same cause. So: is this a known limit of the unelevated sandbox, or a bug? If you use Codex on Windows and need read-only to really mean read-only, is “elevated” the setting to use? Has anyone seen this on a newer version?
document fetched 2026-11-18 00:21 · canonical https://reddit.com/r/ChatGPT/comments/1xy7z66/codex_chatgpts_coding_agent_in_readonly_mode_on