Repository navigation
[skills] Add offload-to-sandbox skill - #326
Merged
Merged
Conversation
Adds "Offloading work to a Vercel Sandbox": how to use the vercel sandbox CLI as remote workers for heavy builds, test suites, benchmarks and parallel agent experiments. Covers base snapshots, per-task sandboxes, source pushes that keep dependencies, detached long jobs, fair A/B benchmarking inside one VM, sharding, baseline failure triage, auth, a small wrapper script, and cost hygiene. Complements vercel-sandbox, which covers running untrusted code through the SDK.
Keep the skill to what an agent needs to get offloaded work done: drop the benchmarking section and related signals, keeping one note about comparing timings in the same sandbox, and remove pitfalls that repeat earlier sections.
Create task sandboxes with --non-persistent and clean up with remove, state plan limits, read the snapshot ID from stderr, work around vercel sandbox exec dropping the remote exit code, and make the sbx wrapper a standalone script. Keep vercel-sandbox out of offload and shard prompts.
Counts assume vercel-tracing (#336) merges first.
molebox
approved these changes
Oct 19, 2026
# Conflicts: # CLAUDE.md # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new skill, Offloading work to a Vercel Sandbox (
skills/offload-to-sandbox). It's about using thevercel sandboxCLI as remote workers for heavy builds, full test suites and many parallel (agent) tasks, so they don't load the local machine. It complementsvercel-sandbox, which covers running untrusted code through the SDK.The content comes from a multi-week performance program in which a dozen coding agents shared one laptop and offloaded builds and sharded test suites to Vercel Sandboxes. It is written to be project-agnostic:
exectimeouts, tagsnode_modulesand build artifactsSANDBOX.mdfor agents, cost and cleanup, and designing for restartsAlso adds the required
⤳ skill: offload-to-sandboxnode to the ecosystem graph invercel.md.bun run validatepasses. The CLI flags were checked againstvercel sandbox --helpfrom Vercel CLI 62.1.0.Update (@molebox)
Merged
mainand fixed the review findings against the Sandbox CLI source (vercel/sandboxpackages/sandbox, thesandbox@4.4.0thatvercel@64.5.0bundles), thevercel sandboxwrapper invercel/vercel, and the Sandbox pricing and persistence docs.--non-persistent, and cleanup usesremove.stoponly ends a session, and a stopped sandbox's name stays taken. The orphan sweep useslist --all --tag …, becauselistshows only running sandboxes by default.--vcpusmust be 1 or even). Examples use Pro sizes and say so.--timeoutis described as the session length. The OOM advice respects the vCPU cap.vercel sandbox execalways exits 0, even when the remote command fails. Thevercelwrapper hands off to the Sandbox CLI and returns 0 (confirmed against 64.5.0). Thesbxwrapper now returns the real remote status.snapshotprints its ID only to stderr (spinner), so> BASE_SNAPSHOTwrote an empty file. The skill now reads stderr.copyneeds a file path destination. A missing source exits 0, sosbx getchecks that the file arrived.--token,VERCEL_AUTH_TOKEN,VERCEL_TOKEN, then the login session, with OIDC only as a fallback.vercel sandboxdoesn't read.env.local.pushdefined inside), and it refuses to push from outside a git repo. All shell blocks passsh -n/dash -n/bash -nand shellcheck.tests/offload-to-sandbox-skill.test.ts. The test covers prompt routing (with negatives), the split with vercel-sandbox (offload/shardadded to itsnoneOf), shell parsing, plan-limit and persistence checks, and thesbxscript run against a stubvercel.Checks:
validate,build:*:check, andbun run test(1157 pass). I didn't create real sandboxes; behaviour was verified from source, docs and stubs.