
vmux
Stateful sandboxes for agents
vmux gives agents a persistent GPU/CPU sandbox — built on Durable Objects for strongly consistent state, streamable logs, and a shell you can reconnect from anywhere.
your laptop
→
uv run train.py
vmux exec abc123 'echo $GPU'
modal A100
claude code
→
bun run dev
3000-abc.purr.ge
cf cpu
codex
→
jupyter notebook
8888-xyz.purr.ge
modal T4
↳ logs stream live, previews work instantly, sessions persist across reconnects
vmux claude install
# adds vmux skill to Claude Code / Codex
# then just ask:
"train nanogpt on an H100"
# agent spins up GPU, clones repo, trains
vmux run -dp 8000 python server.py
# preview URL + session id, keeps running
vmux attach abc123
# tmux from anywhere — laptop, phone, CI
how it works
- AST parses imports, bundles only what you need. Auto-detects deps from
pyproject.toml, requirements.txt, or PEP 723 inline scripts.
- Editable packages? Auto-detected and bundled with transitive deps.
- One Durable Object per session. Strongly consistent state, 512KB log ring buffer, token-gated preview URLs.
- Pre-baked: pytorch, transformers, numpy, pandas, fastapi.
- Agent-native.
--json output, vmux exec --create --gpu H100 spins up GPU + runs command in one step.
- tmux attach from anywhere. Close your laptop, reconnect from phone. Session survives disconnects.
Providers: Cloudflare (CPU), Modal (CPU + GPU).
under the hood
durable object = session core
attach
↘
logs
↓
preview
↙
DO
state
·
log ring buffer
·
preview routing
inside the sandbox
/workspace
your code
/tmp/vmux.log
stdout/stderr
tmux session
attach from anywhere
↳ files + packages persist · logs stream to DO · tmux survives disconnects
vmux run timeline
0s
bundle + upload
~2s
provision sandbox
~3s
extract + install deps
~5s
running · preview URL ready
↳ GPU jobs: ~30-90s (Modal capacity) · cached deps: ~3s · H100: up to 2min cold start
performance
- Cold start to preview URL: ~5s (Cloudflare), ~8-90s (Modal, depends on GPU availability)
- Detached start: ~500ms to get session id back
- Bundler: skips .git, node_modules, venvs, checkpoints. 353MB → 42KB typical.
- H100 cold start: up to 2min (Modal capacity dependent)
- Cached deps: ~3s with
--cache flag. Modal snapshots the filesystem after deps install, restores on next run.
limits
- Cloudflare: 0.25 vCPU, 1GB RAM, 2GB disk (ephemeral), up to 7 days
- Modal: T4/L4/A10G/A100/H100, up to 24 hours per session
- Bundle: 100MB max. Inline upload ≤24MB, R2 for larger.
- Logs: 512KB ring buffer (bounded tail, not infinite history)
- Concurrent jobs: 90 global limit during beta
alpha
- Private beta. pls msg if interested.
- Cloudflare Containers exits all sandboxes on each rollout — sessions may terminate unexpectedly.
- Bundle size limit: 100MB. Use
vmux fs or download large models inside the sandbox.
- APIs may change. Use for dev, not prod yet.
- Why? vmux was made for fun. No plans to open source.
- Roadmap: 1. stability 2. persistent volumes 3. 🐰
- Who? surya.