One of the difficulties with enforcing guardrails is that there are many ways for an agent to achieve the same task, at least when we're speaking of effects on the same system. When Claude is forbidden from calling the Unix or language-specific tool that performs a specific task, it will often write a Python script that calls a library to workaround the rule.
That's how my "trusted" agent will regularly try to extract my ssh keys from ~/.ssh despite what superficially looks like strong rules to prevent it from even accessing that directory. At network level boundaries, one could imagine an agent working around HTTP limitations by reimplementing everything at socket layer.
All this to say that I'm a strong believer in strong typing, but I think that the hard part in what you write is "enforced".
I noticed that overzealous restrictions are often the cause of this behavior. Agents have even less tolerance for random bullshit between them and their goal than people, and if you don't nudge them towards the right way of doing something, they'll find or make a way on their own. It's difficult for me to be upset about it, because it's precisely what I value the agents most for.
Allow me to shill sandvault[0]. It runs on a different account in your Mac, inside sandbox-exec. V1 is stable (used by the Homebrew folks), and V2 is in pre-release. Open source: Apache2 License.
Anachronistic, no? I assumed everyone else was using containers or VMs for this basic level of isolation.
Watching subagents disrespect guardrails and executing python scripts and scanning my SSH keys is exactly what pushed me to never trust an agent harness again.
Do you restrict from writing cron entries? Because it will create a cron entry to copy those ~/.ssh keys to wherever it needs them.
Do you also restrict it from compiling code? Because it will create a C program that will #include those ~/.ssh keys as C data and then print them, and then compile the program and run it.
Yes, the most egregious off-the-rails behavior or misalignment Ive seen is a result of an agent being blocked from completing a task. They are relentlessly creative in completing tasks.
Well I think the hard part you're running up against here is right now almost nothing has a consistent notion of an action.
E.g. bash is turing complete, so trying to bound it is a very complex problem! Meanwhile high XX% of what you want a coding agent to do in bash can be bounded by piped configurations of sed awk and grep.
Unbounded agents are interesting with a HITL, but for fully autonomous agents my perspective is it's your job as a developer to specify the action space with a more restricted set of typed actions, the granularity of which may be very different depending on the task.
E.g. there is a curve between (single agent, bag of tools, compaction) -> (micro actions, highly parameterized tools, bounded contexts and nesting) where micro actions may be
"Given a social security number, full name"
-> ask for account number
-> ask for routing number
-> ask for 2FA
-> ask for recovery questions
--> (requires account, routing, 2FA | recovery) ask for recipient account number
--> (requires account, routing, 2FA | recovery, recipient account) ask for recipient routing number
and most existing implementations are closer to the former than the latter, or an explicit chain of arbitrarily bounded actions rather than a dynamic configuration of the action space.
I had a small version of this. I've got a hook that stops Claude editing one data file and points it at a script instead, and it mostly listens, but every so often it just writes the file from bash via python.
Same thing, fine grained sandboxing. Manually configuring SELinux is a pain. Configuring the programming language sandbox with an LLM should be trivial. If the language networking library only allowlists 2 domains, the LLM can't do much with it, for example.
And because it would be baked in the language, it would be portable across OSes and environments.
Writing this as a language designer: I don't see many languages I couldn't bolt this onto. Yeah, natively compiled C, C++, D and probably Rust and Go are out, because it's too easy to call into native code, but you could use their Wasm toolchains.
What you want is to change their stdlibs to expose capabilities.
This is the wrong approach. Sandbox them enough that you are comfortable with letting them run with full permissions.
My sandbox runs rootless and doesn't have `sudo` either. In addition to bash, the agent is free to install anything it needs via npm or pip, or to write its own scripts.
It doesn't have my signing keys so detecting unauthorized commits is trivial.
> I wouldn't be surprised if some carriage operators or horse handlers back in the day felt a similar sentiment, yet there aren't many of them around anymore.
In fact, printing press illustration engravers became an endangered job almost overnight, once it became possible to reuse these illustrations almost endlessly. Just before, they were highly paid masters of their trade.
> Also a profession doesn't need to be fully eliminated for pain to be felt by a large number of people in it.
For instance, it's much harder to end up with a SQL injection in Rust than in PHP. Similarly, the Rust type system is pretty good at modelling advanced protocols, so it's also harder to attack the lower layers.
Not GP, but the stock market can come down crashing even if AI is incompetent at its job. Executives just need to assume that stockholders believe that they'll invest in AI-native, regardless of the actual performance of the tool.
Absolutely. AI is in the odd position of being tremendously useful sometimes, but also a grift in how it's being sold and deployed to do things at which it's extremely bad. All this in the service of investors who don't care about the quality of products.
I feel that it's very likely that the LLM model was trained at least on existing open-source drivers, no? If so, wouldn't this already mean that it's not 'clean-room' (although not in the sense you're using)?
That's how my "trusted" agent will regularly try to extract my ssh keys from ~/.ssh despite what superficially looks like strong rules to prevent it from even accessing that directory. At network level boundaries, one could imagine an agent working around HTTP limitations by reimplementing everything at socket layer.
All this to say that I'm a strong believer in strong typing, but I think that the hard part in what you write is "enforced".
reply