Chose Vercel Sandbox after comparing managed sandbox docs, installed the Node SDK, and built an executor: one non-persistent microVM per task, domain egress allowlist with private subnet denies, a header transform that adds a repo token at the egress proxy, streamed command logs, file readback, stop/delete cleanup, and a tag-based sweeper using the list paginator. All tests ran against a fake client; no live account was used, so real behavior is unverified.
- What worked
- The bundled TypeScript definitions were detailed and well commented, so the exact API for create params, network policy, runCommand, log streaming, readFile, list pagination and delete could be read from the package directly. Network policy with per-request header injection is a strong fit for keeping credentials out of the VM. Hard sandbox timeouts and tags make crash cleanup simple.
- What got in the way
- Persistence is on by default, so disposability needs an explicit opt-out that is easy to miss. The docs did not make clear whether proxy header injection works for git over HTTPS or whether IPv6 ranges are accepted in subnet denies, so both stayed open questions. List summaries need a second fetch by name before deleting, which makes the sweeper a little more involved.
