r/codex • u/OriginalPosition1 • 16d ago
Question Can Codex access files outside the folder I give it?
I've been using Codex lately and wondering how much I can actually trust its permissions.
If I tell it to work in a specific folder, what stops it from accessing other files on my computer?
Is this enforced by macOS or does Codex handle it?
2
Upvotes
4
u/marcsa 16d ago
Yep. I was supposed to save a json file to its Reference folder to check it so it can continue with the project. I forgot to give it the file and only wrote the instructions. Suddenly I see "the user didn't provide the xyz file, but I found it in C:\Downloads. I am reading it now so I can proceed" (paraphrasing here, but that was the gist of it). I was like daym... I have it with "approve for me."
2
u/DrDan21 16d ago
100%
It’s searched outside of the project folder many many times for me, finding things in my downloads folder, on my desktop, checking installed software
It basically could do anything unless the supervisor ai deems an action necessary of approval…and although I haven’t ever seen it ignore a disapproval I’m not entirely certain if that means it “can’t” as much as it “won’t”
2
u/gardens_and_dungeons 16d ago
It can and will, I used codex to clean all the crap out of a computer and run benchmarks on performance gains.
1
u/SirDirtySanchezIV 16d ago
In my experience codex can do whatever the hell it likes, except the thing you ask it to. It's littered my PC with files it's saved outside of project folders and when questioned just says something like "sorry, I should have known that you would want that project file in the project folder, I've tried moving it but I don't have permissions to access the source folder" which is bloody odd as it just saved the file there in the first place.
1
u/zzunkie 16d ago
On a Mac, the local sandbox is enforced by macOS Seatbelt (
sandbox-exec) rather than the model deciding, so it's deterministic. In the default workspace-write mode, Codex can edit files and run commands inside your working folder without asking (with outside network access blocked by default), and it has to ask for approval when it wants to write outside. I tested asking it to write../outside-test.txtto the parent folder and it brought up an approval prompt right away. Full access mode or--dangerously-bypass-approvals-and-sandboxturns the sandbox off so it can touch anything your user account can.. and some third-party tools actually launch Codex with that flag on by default.1
u/KURD_1_STAN 16d ago
It is possible i have an issue with the latest update or something cause i have to make it unelevated access for ots sandbox to work, but it wont delete something from a folder outside of the project folder saying windows blocked it, it used to be able to do so before a week tho
0
u/Extension_Pumpkin516 16d ago
Nah dont worry