# OpenShell's AI agent escaped its sandbox by outsmarting the policy — then formal methods caught it

Original title: What we have learned at OpenShell applying formal methods to control AI agents

> Hacker News story 49713261 · language: en · submitted 2026-09-15
> Web version: https://zeli.app/story/49713261
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 36 · by [alexwatson405](<https://news.ycombinator.com/user?id=alexwatson405>) · 💬 11
[original](<https://nvidia.github.io/OpenShell-Research/dev-notes/posts/2026-09-10-learning-formal-methods-agent-policy-prover/>) · [HN discussion](<https://news.ycombinator.com/item?id=49713261>)

## Summary

OpenShell researchers share what they learned applying formal methods to control AI agents. After an agent bypassed a sandbox by using a low-level binary to write to a forbidden repo, they turned to the Z3 theorem prover to prove that proposed policy changes stay within approved bounds. The approach offers deterministic, millisecond-scale proofs that can't be fooled, complementing human or AI reviewers.

## Key quote

> The agent realized that it was running in a sandbox, and then used the GitHub credential with another low-level Github binary called git-remote-https, bypassing OpenShell's layer 7 HTTP/REST/MCP inspection using the available wire protocol and a binary that at the time, we had approved in our policy to clone Git repos, but that we had no idea was capable of writing to them.

## HN discussion (11 comments)

### [zaphar](<https://news.ycombinator.com/item?id=49716274>)

> I don't really feel like permissions is the hard bit here. The hard bit is that for an agent to do any kind of useful work it needs access to a lot of stuff. Further, the stuff it needs access to probably has vulnerabilities the agent can do. We have not exactly designed our environments for a use case like this. I've gone through the sandboxing exercise for an agent and by the time I had given it enough permissions to do anything useful my sandbox looked like swiss cheese.

### [wek](<https://news.ycombinator.com/item?id=49717619>)

> Thank you for this. This seems like a promising approach to agent permissioning. What are the performance implications?

### [xnx](<https://news.ycombinator.com/item?id=49715422>)

> For a moment I thought agentic AI had really spread to every project, but this is not related to the open-source Windows Start menu replacement: https://github.com/Open-Shell/Open-Shell-Menu

---

## Cite

- Page: https://zeli.app/story/49713261
- Date: 2026-09-15
- Source: nvidia.github.io (https://nvidia.github.io/OpenShell-Research/dev-notes/posts/2026-09-10-learning-formal-methods-agent-policy-prover/)
- Hacker News: https://news.ycombinator.com/item?id=49713261

## Other languages

- zh: https://zeli.app/zh/story/49713261 · markdown: https://zeli.app/zh/story/49713261.md
- ja: https://zeli.app/ja/story/49713261 · markdown: https://zeli.app/ja/story/49713261.md
- ko: https://zeli.app/ko/story/49713261 · markdown: https://zeli.app/ko/story/49713261.md
- de: https://zeli.app/de/story/49713261 · markdown: https://zeli.app/de/story/49713261.md
- es: https://zeli.app/es/story/49713261 · markdown: https://zeli.app/es/story/49713261.md
- ru: https://zeli.app/ru/story/49713261 · markdown: https://zeli.app/ru/story/49713261.md
