{"slug": "guardrails-for-agents-running-on-your-personal-box", "title": "Guardrails for agents running on your personal box", "summary": "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.", "body_md": "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.\n\nYou 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.\n\nI’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.", "url": "https://wpnews.pro/news/guardrails-for-agents-running-on-your-personal-box", "canonical_source": "https://forum.level1techs.com/t/guardrails-for-agents-running-on-your-personal-box/257215#post_4", "published_at": "2026-09-28 15:17:07+00:00", "updated_at": "2026-09-28 15:19:24.056845+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Docker", "Opencode", "Claude Code"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/guardrails-for-agents-running-on-your-personal-box", "markdown": "https://wpnews.pro/news/guardrails-for-agents-running-on-your-personal-box.md", "text": "https://wpnews.pro/news/guardrails-for-agents-running-on-your-personal-box.txt", "jsonld": "https://wpnews.pro/news/guardrails-for-agents-running-on-your-personal-box.jsonld"}}