Hacker Newsnew | past | comments | ask | show | jobs | submit | Yoric's commentslogin

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.

Interesting point.

But I really, really don't want agents to look into my ~/.ssh, and I don't see any way to do this without "overzealous restrictions".


I worry about my SSH keys too.

Local sandboxing?

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.

  brew install sandvault
  sv2 install
  sv2 claude|codex|shell|... 
[0]: https://github.com/webcoyote/sandvault

> But I really, really don't want agents to look into my ~/.ssh, and I don't see any way to do this without "overzealous restrictions".

Run the agent process inside bubblewrap, with --tmpfs $HOME/.ssh. The agent process then sees a filesystem where ~/.ssh is empty.


Sadly, it's a bit more complicated, because it needs some (indirect) access to keys to be able to, say, pull Merge Requests.

Still possible, but not ideal.


don't give them physical access to you ~/.ssh.... spend 600$ and buy a mac mini for them and give them their own ~/.ssh folder

> spend 600$ and buy a mac mini for them

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.


Well, I'm renting out cloud time to do this, but yeah, that's what I do.

It does feel like a slightly overzealous restriction, though.


It seems like pretty much what you need. In fact I'm a little nervous even then, given the capabilities of frontier models.

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.

etc. etc.


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.

Sed alone is already scary enough

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.

My guess is that long term we will block agents from using bash. They will get a very limited set of carefully crafted primitives.

Will we also block them from running programs they have written? Because if we don't, they don't need bash. And if we do, they can't run tests.

We will probably end up needing LLM specific languages, so yeah.

What would the language change?

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.


So basically you want capabilities?

You don't really need a new language for capabilities, although you most likely need a dedicated runtime and/or stdlib.


> although you most likely need a dedicated runtime and/or stdlib.

So, a new language. Do you see any existing mainstream language that you could bolt this onto? I don't.


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.

Very good point, too.


Memory safety is just the start.

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.


If you have minutes to patch, pretty soon, you'll have seconds, then microseconds.

Your point is quite interesting, but I don't think that the compilation time will be a real differentiator.

(also, I believe I've seen Rust frameworks that support some kind of live patching)


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.

In fact, that's what I'm witnessing.


Stock markets did go down without AI in the mix, too.

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 don't write papers these days, but when I was, I used to spend weeks writing and polishing one.

Spending only a few hours on an original paper? I don't even see how that's possible. Maybe if it's a summary of a larger paper?


In French, "it's a double-edged knife".

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)?

Also, quite useful for improv and ttrpgs :)

Since we're there, centralizing services à la HAL is probably more efficient.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: