logoalt Hacker News

Yoric • today at 6:49 AM • 5 replies • view on HN

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".


Replies

TeMPOraL • today at 7:36 AM

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.

➕ show 1 reply
nostrebored • today at 8:08 AM

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.
Skyfall106 • today at 8:06 AM

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.

oblio • today at 9:48 AM

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

➕ show 2 replies
gldywn • today at 10:39 AM

[dead]