AI & Agents

An Idea I’m Considering: Locking Coding Agents to Their Working Folder in My Home Lab

Leave a comment

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

  1. Give each project its own folder, and only open the agent there. Nothing else important lives in that tree.
  2. Turn on each tool’s own guardrails where they exist, like permissions.blockWritesOutsideWorkingDirectories in Claude Code 2.1.314 and permission rules in OpenCode.
  3. 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.
  4. Keep keys and credentials out of the project folder and out of the agent’s environment unless a task truly needs them.
  5. Default to no network for the sandbox and open it up only when needed.
  6. 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!

References & Further Reading

Subscribe (RSS) Follow AI & Agents via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.