Agents in the Sandbox
Railway sandboxes now ship Claude Code, Codex, OpenCode and Pi in the default image and can join an environment's private network, which lets agents test against real Postgres, Redis and internal services. The suggested workflow builds a template, configures a sandbox, takes a disk checkpoint, then creates or forks sandboxes from it so parallel agents start from a prepared workspace. Templates are cached builds from shell instructions, checkpoints are server-side disk snapshots that outlive the source sandbox, and forks clone a running sandbox's files but not its processes. TypeScript SDK and CLI examples cover detached agent sessions you can reattach to, port forwarding and a four-agent repo review app.
Related posts
- Running AI agents in GitHub Actions with Docker Sandboxes
Docker mediumAdeptGitHub Agentic Workflows (gh-aw 0.82.9) supports Docker Sandboxes (sbx) as an agent runtime, so a CI coding agent gets root, sudo and unrestricted shell inside a disposable microVM with its own kernel and private Docker daemon. Outside that VM it is limited by a network allowlist, a read-only token and a safe-output job that may only touch src/**. In the worked example, a Copilot agent on an ubuntu-24.04 runner runs a Java 21 Testcontainers/PostgreSQL suite, adds a regression test exposing a case-sensitive email uniqueness bug, applies a one-line normalization fix, and opens a draft PR. The run took about 11 minutes, and setup needs Docker credentials as secrets plus a KVM-capable host for self-hosted runners.
- Agent Swarms on Sprites
Fly.io mediumAdeptRunning each coding agent in a swarm on its own Sprite (a Fly.io sandboxed machine) avoids the shared-filesystem, conflicting-dependency and blast-radius problems of co-located agents. An orchestrator Sprite running Claude Code creates worker Sprites via the API and hands them tasks. Workers can checkpoint and restore their whole environment in about three seconds, which makes speculative parallel attempts practical. Per-agent DNS-level network policies restrict egress, results can flow back over HTTP endpoints, a shared Postgres Sprite or orchestrator file reads, and idle Sprites pause and persist.
- Where should your code live in a Docker Sandbox?
Docker mediumAdeptDocker's sbx sandboxes for coding agents support three ways to place a repository, and each changes how the human participates. Mounting the host checkout gives live shared editing and hot reload, but branch switches and dependency installs are shared, and native binaries like esbuild can break across Linux and macOS/Windows. Mounting a host git worktree isolates tasks but leaves the agent without Git, because the .git file points outside the mount. Clone mode or a mountless sandbox keeps an independent checkout with full Git, at the cost of handoff via remotes, `sbx ports` publishing for previews, and losing files when the sandbox is deleted.
- Building AI Teams: How Docker Sandboxes and Docker Agent Transform Development
Docker mediumAdeptDocker Agent defines teams of specialized AI agents in YAML, where a root "product manager" agent delegates to designer, engineer, QA and fixer sub-agents, each with its own model, instructions and toolsets (filesystem, shell, think, todo, memory, MCP). Docker Sandboxes runs these agents inside dedicated microVMs (Docker Desktop 4.60+), mounting the project at the same absolute path, withholding host environment variables, and enforcing network allow/deny lists so agents can install packages and run commands without touching the host. A step-by-step walkthrough builds a Gradio bank app with a four-agent team. Limitations: everything is experimental, microVM sandboxes require macOS or Windows, and only one sandbox is allowed per workspace.
- Building with Modal and the OpenAI Agents SDK
Modal mediumAdept
A custom agent harness built on the OpenAI Agents SDK runs coding agents inside Modal Sandboxes, optionally with GPUs, rather than on the host, where an unsandboxed exec tool can be abused by malicious prompts. The harness grows step by step: SQLite-backed Sessions for memory, an orchestrator that delegates to subagents with fresh context windows to limit context rot, and an asyncio-based subagent pool for parallel, non-blocking work. Hooks and a set_status tool let the orchestrator monitor subagents, and per-GPU-type quotas cap spend. Filesystem snapshots are also used to avoid duplicated work. The worked example targets OpenAI's Parameter Golf challenge, with parallel MNIST training as an intermediate test.