← Back to library

Isolated VM coding agent that can only open PRs

spacephysics runs Claude Code inside a dedicated virtual machine on a locked-down VLAN that reaches only the internet, a Forgejo server and an Infisical secrets store, with one-way SSH in. Secrets flow from the store without being shown to the agent, whose Forgejo account can only open issues and pull requests. A person merges by hand before CI ships.

  • OutcomePut the coding agent on a separate virtual machine with tight network rules, feed it secrets from a secrets store, and give its git account only issue and PR rights.
  • SetupAn afternoon+
  • LevelAdvanced
  • Creditspacephysics on Hacker News
View original
Works with
Claude Code

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 24, 2026

When should you use it?

  • You worry about agents near personal data
  • You self-host git
  • You can set up a VM and network rules

Not for: Teams without infrastructure skills; Laptop-only setups

What do you need, and what do you get?

You need

  • VM and network rules
  • Secrets store
  • Limited git account

You get

  • Agent isolated from personal data
  • PRs only, merged by you
  • CI deploy after merge

How does it work, step by step?

  1. Separate machineGive the agent its own VM, away from your personal files.
  2. Restrict the networkAllow only the internet, your git server and the secrets store.
  3. Feed secrets safelyPull secrets at runtime so the agent does not see them.
  4. Limit git rightsGive its account issue and PR rights only.
  5. Merge by handReview and merge yourself, then let CI deploy.

The prompt

Our own prompt, inspired by spacephysics on Hacker News and written to work in Claude Code. Values in lime are placeholders.

Fill in the blanks (optional; the copied prompt uses your values)

Prompt2 variables
Help me plan an isolated VM for a coding agent. My git server: {git_server}. Secrets store: {secrets_store}.
List network rules allowing only what is needed, how secrets reach the app without the agent seeing them, the minimal git permissions for opening issues and PRs, and the merge and CI steps.

Inspired by spacephysics on Hacker News: Comment in How abliterated models can get you pwned. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Local development runs can reveal some secrets.
  • Guard models add cost and false alarms, per the developer.
  • Keep the VM patched.

Our take

Few setups describe least privilege this cleanly in a single comment. spacephysics separates three questions: the network rules decide what the agent can reach, the secrets store decides what it can know, and the Forgejo account decides what it can change. Each layer limits damage if another fails. The pull-request-only account is the part with the best effort-to-benefit ratio, because it turns every change into something a person must merge, and CI only deploys after that. The isolated VM matters for a different reason the commenter raises: your daily computer holds banking, health and personal files, and an agent with a shell has no need to see them. You do not need a homelab to copy the idea. A cloud VM or a local virtual machine with a separate git account restricted to branches and pull requests gets most of the benefit in an afternoon. Note the stated exception, that dev mode can expose some secrets, and keep those to low-value test credentials.

Where the time goes back: The agent can work freely without any path to your personal data or production.

FAQ

Is it overkill?
The developer says so, but thinks the data risk justifies it.
Who deploys?
CI, only after a human merge.

Source and credit

Inspired by spacephysics on Hacker News. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
Comment in How abliterated models can get you pwned
Creator
spacephysics on Hacker News
Published on
Hacker News
Original date
Oct 20, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude Code
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends, bookings or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecurityWorkflow✓ AI dry run

Compare an agent run with a task you did by hand

Before you believe big productivity claims, time and cost one routine agent task against a similar one you did yourself, counting review and cleanup.

Credit: Chris_Newton on Hacker News

Under an hour
IT & SecuritySkill✓ AI dry run

Find repeat fixes and good habits in your team's PRs

Have Claude Code look across a chosen window of commits and pull request review comments for the same fix or review note coming up again and again, suggest turning the top ones into a project rule or skill you write in your own words, and list good practices already in the repo that other teams could copy.

Credit: anthropics

Under an hour
IT & SecurityPrompt✓ AI dry run

Recheck intent by rereading your own messages

On long projects, ask the agent to go back over every message you wrote, restate what you wanted, then measure the work against that.

Credit: visarga on Hacker News

Minutes