This is a plan, not a done deal. Between the “Embrace” bugs in AI coding tools and Claude Code’s new setting to block writes outside the working folder, I’ve been thinking about how to keep agents in their lane in my home lab.
What I’m considering
- Give each project its own folder, and only open the agent there. Nothing else important lives in that tree.
- Turn on each tool’s own guardrails where they exist, like
permissions.blockWritesOutsideWorkingDirectoriesin Claude Code 2.1.314 and permission rules in OpenCode. - Since those settings don’t cover everything (shell commands, built-in browsers), run the agent in a container or a separate low-privilege user that can only see the project folder.
- Keep keys and credentials out of the project folder and out of the agent’s environment unless a task truly needs them.
- Default to no network for the sandbox and open it up only when needed.
- Test it by asking the agent to write a file one folder up and confirming it fails.
Review before you install: read the release notes and any command yourself before you run it, back up your config, and try it somewhere you can afford to break first.
My take
I haven’t set this up yet. If I do, I’ll write up what worked and what got in the way.
God Bless, and Happy hacking!