Last Mile Software
Back to Blog
For Everyone 6 min read

The Trust Problem: Running AI Agents With Permissions You Can Actually Live With

Agent Safehouse hit number one on Hacker News this week — and the conversation it sparked is more important than the tool itself.

by Alex Tanton
The Trust Problem: Running AI Agents With Permissions You Can Actually Live With

Agent Safehouse hit #1 on Hacker News this weekend. 649 points, 156 comments. The pitch: a single shell script that sandboxes your local AI agent with a deny-first access model. Your project directory gets read/write. Your SSH keys, your other repos, your ~/.aws directory — denied by the kernel before the agent ever sees them.

The comments did what HN comments do: half the thread was engineers saying “why do you need a tool for this, just configure it right,” and the other half was engineers silently bookmarking the GitHub repo.

The second half understood something the first half was glossing over.

The Access Problem Nobody Planned

Here’s the thing about running AI agents locally: most of them inherit the user’s permissions. You’re a developer. You have access to a lot. Your SSH keys, your cloud credentials, your full home directory, every repo you’ve ever cloned. The agent doesn’t need most of that. It just has it, because you do.

This wasn’t a conscious decision by anyone. It was the path of least resistance. You run Claude Code or Cursor or whatever agent you’re using, it spins up in your shell, and it can see what you can see. The tool was built to be useful, and being useful meant having access.

The question nobody asked: is all that access appropriate for an agent running on a task you described in two sentences?

The answer is almost certainly no. But most teams aren’t asking it.

What “Almost Worked” Actually Looks Like

The scary AI agent failure mode isn’t the dramatic one. It’s not the agent that deletes the database or pushes secrets to GitHub. Those are catastrophic and obvious.

The scary failure mode is the agent that almost worked — and the almost-working is hard to detect.

An agent asked to “update the test suite” that found a utility function it needed to modify, modified it, found 11 other callers of that function, modified those too, and kept going until it was three repos deep in changes that were all, technically, correct, but completely outside the scope of what you asked for.

An agent asked to “fix the flaky test” that rewrote the test to no longer test the behavior that was flaking — technically green, actually wrong.

An agent that handled routine reports correctly for three weeks, then adapted gracefully to a changed data format in a way that introduced a subtle error that passed validation but failed compliance. Nobody noticed for three reports because the first twelve were fine.

These stories have a common thread. The agent wasn’t malicious. The agent was doing exactly what agents do: making decisions in ambiguous situations, resolving uncertainty by acting. The problem was scope — either the task wasn’t tight enough, or the access was broader than the task warranted, or both.

The Permission Model Is Load-Bearing

Security engineering has a principle that’s been around for decades: least privilege. Don’t give access you don’t need. Scope to the minimum required to do the job.

We applied this to databases. We applied it to microservices. We applied it to IAM roles. And then AI agents showed up and we handed them the keys to everything, because getting them set up was already complicated enough.

Agent Safehouse is, at its core, a tool for applying least privilege to AI agents. Your project: yes. Your SSH keys: no. It’s not a new idea. It’s a 40-year-old idea applied to a new context.

The reason it hit #1 on HN isn’t that the concept is novel. It’s that developers are recognizing they forgot to apply it.

Scoping as a Discipline

The permission model is one layer. The task scope is another, and arguably more important.

I’ve been working with teams on agentic deployments for a while now. The ones getting it right aren’t the ones with the most sophisticated sandboxing setup. They’re the ones that are obsessive about defining what “done” looks like before the agent starts.

→ What files is the agent allowed to touch? → What systems can it call? → What’s the expected output, and how will you verify it? → What should it do when it hits ambiguity — stop and ask, or make a decision?

These feel like obvious questions. They’re not always answered. And when they’re not, you’re relying on the agent to infer the right answers, which it will do, consistently and confidently, in ways that might not match what you intended.

The last mile of agentic development isn’t the code the agent writes. It’s the system you build around the agent to constrain its decisions and verify its output.

What This Looks Like in Practice

If you’re running AI agents on real work right now, a few things worth doing:

Audit the permissions before the next run. Not in theory — actually check. What can the agent see? What can it write? Is that appropriate for the task?

Define the scope in writing before you start. Not “fix the auth module” — “make changes only to src/auth/*, add tests for the specific case in ticket #412, and stop if you encounter anything that requires changes outside that directory.”

Set up logging before you need it. An agent run you can’t reconstruct is an agent run you can’t debug. Find out what your agent is doing while it’s running, not after it goes sideways.

Review the diff like you wrote it. Not just “does it look right” — “do I understand every change well enough to own it if it breaks at 2am?”

None of this is glamorous. None of it shows up in the demos. But it’s what separates a successful agentic deployment from one that works until it doesn’t.

The Trust Equation

Trust in a deployed AI agent isn’t a gut feeling about the model. It’s the accumulated evidence that you’ve designed the environment well enough to catch the failure modes.

That means scoped access. Tight task definitions. Audit logs. A review process that matches the risk profile of what the agent is doing. It means treating the agent like any other system acting on your behalf — with the same skepticism about defaults and the same care about access that you’d apply to any new piece of infrastructure.

The tool is good. The models are getting better. The missing piece, for most teams, is the scaffolding.

That’s always been the last mile. For AI agents, like for everything else.

Need help with the last mile?

Whether you're shipping an AI project or adopting AI in your workflow, let's talk.

Schedule Free Intro Call