cd /news/ai-agents/guardrails-for-agents-running-on-you… · home › topics › ai-agents › article
[ARTICLE · art-141061] src=forum.level1techs.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Guardrails for agents running on your personal box

A developer recommends running AI coding harnesses such as Opencode and Claude Code inside a Docker container rather than as a regular user on a personal machine, using a Dockerfile that installs standard tooling and the harness, a non-root user matching the host UID, and volume mounts for the workspace and ~/.config/opencode. The entrypoint can be set to the harness itself or to a placeholder like cat or sleep so the user can exec into the running container. The author says they have been meaning to make this change because running Opencode and Claude Code as their regular user is "starting to worry me too.

read1 min views5 publishedSep 28, 2026

You can create a Dockerfile with all your standard tooling in it (compilers, interpreters, build systems, etc.) as well as your harnesses like Opencode. Then -v your workspace and ~/.config/opencode. Create a user in the Dockerfile and have it run as that user instead of root. You can give it your UID so it can read/write to the workspace in the volume mount.

You can set the entrypoint to your harness (e.g. opencode). Alternatively you can set the entrypoint to something like cat or sleep, then just exec into the running container to start the harness or whatever other tools you want.

I’ve been meaning to do this myself. I do tend to run Opencode and Claude Code just as my regular user and it’s starting to worry me too.

── more in #ai-agents 4 stories · sorted by recency
── more on @docker 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/guardrails-for-agent…] indexed:0 read:1min 2026-09-28 · —