cd /news/ai-agents/pi-am-i-sandboxed · home topics ai-agents article
[ARTICLE · art-97438] src=perrotta.dev ↗ pub= topic=ai-agents verified=true sentiment=· neutral

pi: am I sandboxed?

Pi, a coding agent from earendil-works, incorrectly claimed it was not sandboxed, but probing commands revealed it runs inside a Debian 12 container on an Alpine Lima VM under Rancher Desktop, with a macOS-shaped working directory and a /.dockerenv file. The agent's self-description came from its system prompt, not its actual environment, highlighting that agent introspection is documentation lookup, not measurement.

read2 min views1 publishedAug 14, 2026

Problem statement: asking a coding agent whether it runs in a sandbox returns a confident answer derived from its system prompt, not from the machine it is actually running on.

I asked Pi exactly that. The reply was assured:

No — pi itself doesn’t sandbox tool execution. When I run

bash

,edit

, orwrite

, they execute directly on your machine with your user’s permissions, in the current working directory (/Users/thiago.perrotta/.pi

). […] But there’s no OS-level sandbox (no container, no seccomp, no filesystem jail).

It’s plausible, well-formatted, and…wrong!. One typo-ridden command was enough to break the illusion:

% ls ~/worksppace
ls: cannot access '/home/hostuser/worksppace': No such file or directory

~

is not /Users/thiago.perrotta

. The follow-up probe:

% pwd; uname -a; whoami; cat /etc/os-release
/Users/thiago.perrotta/.pi
Linux lima-rancher-desktop 6.18.37-0-virt #1-Alpine SMP PREEMPT_DYNAMIC 2026-06-29 10:52:25 aarch64 GNU/Linux
hostuser
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"

A macOS-shaped pwd

inside an aarch64 Debian container, on an Alpine Lima VM, under Rancher Desktop. Containerception.

And the giveaway at the filesystem root:

% ls -la / | head -5
total 68
drwxr-xr-x   1 root root 4096 Aug 15 00:54 .
drwxr-xr-x   1 root root 4096 Aug 15 00:54 ..
-rwxr-xr-x   1 root root    0 Aug 15 00:54 .dockerenv
drwxr-xr-x   3 root root 4096 Aug 15 00:54 Users

/.dockerenv

, plus a /Users

bind mount recreating just enough of the host path for the system prompt’s cwd

to resolve.

The model was not lying; it had no way to know. Its self-description comes from tokens someone else wrote, while the ground truth sits one uname

away. The useful lesson is that agent introspection is a documentation lookup, not a measurement — for anything security-relevant, make it run the command.

The sandbox was cco.

🤖 *Drafted with *

/bloggify

.— § —

Reply via [email](mailto:serendipity@perrotta.dev?subject=Reply to: pi: am I sandboxed?)

── more in #ai-agents 4 stories · sorted by recency
── more on @pi 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/pi-am-i-sandboxed] indexed:0 read:2min 2026-08-14 ·