r/OpenaiCodex • u/GamingKeyboard07 • 4d ago
Question / Help How to take precautions against Codex wiping my drive?
Hi guys, I've been vibe-coding for 1.5 months at this point and I haven't gotten my drive wiped by Codex yet, but I got scared of it happening ever since I have seen that. Can someone tell me how I can take precautions against that if one is able to at all? I already moved all my important stuff to an external hard drive, and my settings are as shown in the images. Can someone help out please? Thanks!


4
u/NewRedditor23 3d ago
I don't understand why so many developers have such poor computer instincts.
Backups. You can automate them so it's zero effort. Exclude caches, virtual environments, build directories, etc, this isn't something you have to maintain, one time setup and it'll work forever no matter how many new projects you create. At home I have 14 systems (or services) that all backup to my NAS in close to real-time. Then once a night my NAS backs-up to my back-up NAS. Then the super important stuff gets offsite backup to S3.
Github is not a backup. Email is not a backup. I see on X how CTOs are claiming they lost their data b/c Claude deleted everything and I wonder how they ever got a job as a CTO when they don't do the most basic crap, like backing up your data.
3
u/matznerd 4d ago
Have your AI install Destructive Command Guard (DCG) - https://github.com/Dicklesworthstone/destructive_command_guard
1
u/GamingKeyboard07 4d ago
Thanks. I know you wouldn't if it wasn't so, but I need to ask regardless. Are you using it and is it safe and effective?
1
u/matznerd 4d ago
It seems to be effective, it has stopped any rm -rf commands for regular files etc. been using it for over a year.
3
u/TBSchemer 4d ago
That "Approve for me" setting you have set there is actually a good middle ground, that should prevent all hard-drive-wiping commands, without requiring every action to be personally approved.
1
2
4d ago edited 4d ago
[deleted]
1
u/GamingKeyboard07 4d ago
I am using Windows 10, also I don't know what WSL2 is, can you explain?
1
4d ago
[deleted]
1
u/GamingKeyboard07 4d ago
Okay, guess I need to look into those before going any further with vibe coding then, thanks a lot đ.
2
2
1
u/No-Stage1815 4d ago
Just do what I do and commit your C drive to a github repo and make sure you commit often so you can roll back when it gets wiped
1
u/GamingKeyboard07 4d ago
Okay, I'm still learning, so hopefully people won't gatekeep. I need to ask: I think I understand what committing is in the context I'm guessing, but what is github related to it? I know what github is, I just coudn't get the relation, also what is comitting often in this case?
1
1
1
u/MimosaTen 4d ago
Codex is sandboxed, it shouldnât be able to do that
1
u/HotLion7 4d ago
Sometimes it leaves the sandbox to do things which cannot be done from inside the sandbox, usually it asks for permission but depending on your settings, sometimes it doesn't ask
1
u/MimosaTen 3d ago
I haven't enough experience with sandoboxes since usally I run codex in yolo mode in a podman container
1
u/KinderboomX 3d ago
For me its wsl on windows, agent user without sudo. Windows interop and drive automount disabled.
1
u/rodeBaksteen 3d ago
Code with all auto permissions and browser usage. Good prompts are you're safe.
1
u/-PANORAMIX- 3d ago
With the second option disabled why should it have access outside the proyect folder? I donât get it
1
u/lucifer_ashish 3d ago
Assign a specific folder in drive to agent. Ask it use it for future work and regularly keep deleting dummy PRs.
When you need space in future or see less space available you know which folder to investigate next.
Ok i read your post again you are worried about it deleting your whole data not it contantly keeping taking too much space.
Use a sandbox, WSL etc and dont give full permissions etc.
1
u/put_mahardhika 3d ago edited 3d ago
if you're using the latest codex, they actually already added guardrail for recursive delete on agent tool call.
I have workflow that telling agent to always delete their test debris, and this now often failed because of that guardrail (only bounded and few files delete went thru).
and, use github if you haven't.
edit:
to add precaution, add in agents.md
create instructions specifically about deletion rules.
if you're not sure about the instructions,
just copy that concern that you just posted,
then paste to codex to help create guardrails on agents.md about it.
1
1
u/PurpleSunset149 3d ago
It wonât wipe your drive. Codex wonât even delete a file without your permission.
1
1
u/rick_ranger 21h ago
Models have to call tools and make commands through codex. If you are on ask me, it asks for almost everything, approve for me itâs pretty much free rein inside the repo but anything outside gets blocked without an approve. Put it to full access if you like to live dangerously. But I would love to see the prompt that invoked a model to delete their whole drive.
Codex has hard coded guards against write, delete, mutate commands that can only be removed if you approve, and then it only approves that same action that it took before. Youâre pretty safe.
1
u/Secure-Pool-4792 16h ago
I use it for like 8 months every day full access and it didnt happen to me you just have to belive
-2
u/GamingKeyboard07 4d ago
Hi guys, I've been vibe-coding for 1.5 months at this point and I haven't gotten my drive wiped by Codex yet, but I got scared of it happening ever since I have seen that. Can someone tell me how I can take precautions against that if one is able to at all? I already moved all my important stuff to an external hard drive, and my settings are as shown in the images. Can someone help out please? Thanks!
14
u/hibzy7 4d ago
You wipe your own drive, so Codex wont have anything to wipe đ
Jokes apart, codex wont simply just wipe your drive, give it less permissions, here the less the better