Skip to content

Tweet by KentonVarda

September 6, 2026

Yeah the bash-parsing permissions approach doesn't work but I figured out something better. I run OpenCode in a mount namespace sandbox that gives it exactly the file access I want: - Most of my home directory is hidden, except specific project directories and some config that the agent actually needs. - .git directories are read-only, so the agent can't mess with my staging. (I use staging to keep track of what I've reviewed already and agents were constantly using `git stash` to blow it away just so they could check if some test failure was pre-existing, which of course it never was.) So now I can set bash to "allow" and not worry about it. But it's not a full sandbox like a VM or a container -- the agent still operates directly on the same files my editor sees. I really think at this point sandboxing of some sort is the only reasonable way forward. What I'd really like to see is the agent running on top of a FUSE filesystem that not only enforces permissions but also tracks changes, captured back into the harness.

Author
KentonVarda
Date
September 6, 2026