MHN
Add a comment on Hacker News →
3 of 158 comments
  1. I am certainly no expert in this space so it is quite possible I'm missing something critical, but what seems to work for me is a Podman image I built on my computer with some basic things I need (using OpenCode, but I imagine any other agent could be used instead):

      FROM docker.io/archlinux:base
      RUN pacman -Syu --noconfirm && \
          pacman -S --noconfirm \
          base-devel \
          git \
          curl \
          uv \
          opencode && \
          pacman -Scc --noconfirm
      RUN mkdir -p /etc/opencode 
      WORKDIR /workspace
    
    From there I just run the Podman image from the command line (using a Fish function) that mounts the specific project I'm working on to /workspace. I guess there might be some vulnerabilities with shared kernels and such, but it seems like an easy way to have some isolation.
  2. I use a raspberry pi for all my experiments

  3. If you are a Nix flake enjoyer, I whipped up something similar to this (Claude Code-only right now) based on microvm.nix: https://github.com/cdata/katsuobushi/tree/main/lib/sandbox

    Some highlights:

    • Drives Claude Code as a quasi-subagent via "Channels," which supports multi-turn interaction with the host and suspend / resume
    • Declarative configuration in the flake of exactly what is copied into the VM (besides the local project), what DNS origins are allowed, etc.
    • Shared access to host Nix store / object DB via overlay FS
    • Syncs code with the host over a shared (local) Git remote (no worktree mess to manage)
    • Devshell commands for quickly dropping into the guest and viewing status of all VMs etc.
    • VMs start in a couple of seconds