I think the real issue is that tools are doing this internally. Tools that claim to only read certain directories are using prompts instead of actual code as guardrails
Step 1 is recognizing that generative AI is not intelligent and cannot think, reason, or apply logic and so no output can ever be trusted. It is great as a tool, as long as you have frameworks in place to verify everything.
No human is ever to be trusted, either. Especially the end user. We have that much in common with AI, regardless of its ability to think, reason, or apply logic. Thus, all human actions also need guardrails.
Which is why every operating system since about Windows Vista (and every non-Windows OS since a long time earlier than that) has had actual file ownership and permissions. (And if you're running your AI agent as root, you have bigger issues between the ears.)
Yeah, that is my main problem as well. How can you get codex to not try to do this, even when in a sandbox? The only way is to prompt it through an agents file to not ever try to write code. But even that isn't foolproof; it can easily just ignore that instruction. Why isn't there a setting for it instead?
It shouldn't be "remove the hands from the AI so it can't open the door", it should be "remove the door".
AI can only do so much if there is so much to do.
It's like unplugging the internet. AI cannot connect to the internet if it has no medium, that's what the sandbox is for, remove the medium through which the AI can do things out of scope.
Program the OS such that no file may be created and the AI will not be able to.
Edit: not even try to do it..? Hmm yeah that's a tough one. Maybe not train or test it with it? Disable it during training?
I mean in terms of directories, you can and should control that too. Never run an agent on bare metal. It gets a docker container and give it only the directories it needs.
But yes your point overall still stands, the fundamental issue is that the generative AI is being used to decide what tools are needed in a situation.
Even tools which prompt you for permission don't work very well, because they tend to prompt way too frequently leading the user to get used to hitting space without thinking.
A large compounding part of the problem is that agents create overly complex commands to accomplish basic tasks. They also aren't aware of what they have access to or not, and there's no mechanism to inform them that they don't need to run a bash script to read the last 5 lines of a file.
I'm hoping this problem can be solved, but the core problem still remains where the agent is driving the decisions.
That aside, often times it also is the inability to formulate a prompt or rule properly. Telling an agent "you can only read" is different from "you are not allowed to change any files".
Well, "read-only" has a clear unambiguous meaning in the industry. I see no good faith interpretation that'd allow writing on the file. At most making a copy and editing that to understand it better, but its a bit of a stretch too.
104
u/Kiroto50 3h ago edited 3h ago
We're only doomed if this is the only way you're blocking AI.
You use sandboxes. You remove the ability for your tool to do some things, so it doesn't do it, not even on accident.
Edit: learned it the hard way back on 2020 after developing a program and wiping a hard drive of all my music projects while testing.
I also learned I should have a backup, which I didn't have.
130
u/Zeikos 3h ago
I don't get why people think that "telling" an agent is enough.
Hell, even humans need guardrails otherwise they take shortcuts.
10
u/keatonatron 3h ago
Where is the humor? Can someone explain the joke?
17
u/fugogugo 3h ago
just enable plan mode smh
7
u/cgebaud 3h ago
People who think like this are idiots.
6
u/cheezballs 2h ago
I don't understand this meme. OP doesn't understand AI. Lotta stupid here.