Start a warm worker
1
Prepare the baseline
Create the worker verification script that the snapshot will carry into every worker:When the command exits,
verify-worker.sh
agent-base is stopped and ready to snapshot.2
Create and verify the snapshot
3
Launch a clean worker
--copy-dir cannot be combined with --from-snapshot, so the worker boots first and receives the committed tree afterward. git archive excludes .git, checkout credentials, and untracked files such as a local .env; review the committed tree for secrets before sending it. Initializing a new repository inside the worker preserves useful diff workflows without copying host remotes or credentials. Each transferred or interactive workload sets its own process, file-descriptor, and per-file limits.Each launch receives its own writable layer. Changes made by one worker do not modify the snapshot, the host project, or another worker.This worker uses microsandbox’s default public-internet profile so OpenCode can reach a configured provider. For sensitive projects, replace it with a deny-by-default allowlist for the provider and source hosts you need, and use host-held secrets instead of copying credentials into the worker.
4
Clean up
Remove the prepared sandbox and workers:Remove the reusable snapshot only when you no longer need it:
Refresh the baseline
Snapshots are immutable. To update packages, recreateagent-base, then overwrite the named snapshot intentionally: