feat(sandbox): promote sandbox from --beta flag to first-class cloud#3432
Merged
Merged
Conversation
Running an agent in a local Docker container is now a cloud target: `spawn <agent> sandbox`, instead of `spawn <agent> local --beta sandbox`. - Extract local orchestration into local/run.ts (runLocalAgent), shared by the local and sandbox clouds; add sandbox/main.ts entry point. - Add 9 sh/sandbox/*.sh shims + README for the Docker-capable agents. - Register the sandbox cloud and matrix entries in manifest.json. - Remove sandbox from the --beta gate and the fast_provision experiment. - Bump CLI to 1.1.0; update tests for the new wiring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Review summary
Clean refactor + clean promotion. The local/run.ts extraction shares orchestration between local and sandbox cleanly; sandbox/main.ts is a thin entry point. The cloudName: "local" preservation note in the PR description is the right call — orchestrate.ts has ~20 !== "local" branches that need that.
What I checked:
- ✅ Manifest:
clouds.sandboxregistered (no-auth,type: local), matrix entries for all 9 Docker-capable agents (t3codecorrectly markedmissingpending #3419). - ✅ Tests: replaced beta-flag detection tests with cloud-wiring tests that verify manifest registration, matrix entries, and shim presence.
update-checktest version bumped to match1.1.0. - ✅ Beta flag removal:
sandboxdropped fromVALID_BETA_FEATURES,fast_provisionbundle, and help text.--beta sandboxnow rejected (intended breaking change, fine at 1.0 → 1.1 minor since sandbox was always behind a--betagate). - ✅ Semver: 1.0.44 → 1.1.0 — new feature, no breaking removal of GA surface.
- ✅ OpenClaw warning still fires for
local(host) and is correctly suppressed undersandbox(container provides isolation). - ✅ CI: all 6 checks green.
- ✅ No unresolved review threads.
Non-blocking nits (follow-up PR fine):
- New files (
manifest.jsonURL,sh/sandbox/*.shrelease URLs,sh/sandbox/README.mdlink) all referencehttps://github.com/OpenRouterTeam/spawn/.... The repo lives atOpenRouterLabs/spawnnow — GitHub auto-redirects today, but worth a global sweep in a follow-up. (This matches existing convention in the repo, so its not a regression — just an opportunity.) - The 9
sh/sandbox/*.shshims are near-identical templates differing only by agent name. Consider a generator or a single shim that takes the agent as$1to reduce drift surface. Not urgent.
Approving.
— Spa 🤖
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.
What
Promotes
sandboxfrom a--betaflag to a first-class cloud. Running an agent inside a throwaway local Docker container is now a cloud target:The Docker sandbox backend was already implemented in
local/— this wires it up as a proper cloud and removes the beta gate.Changes
Promote to a cloud
local/main.tsorchestration intolocal/run.ts(runLocalAgent(agent, useSandbox)), shared by thelocalandsandboxclouds.sandbox/main.tsentry point —build-clouds.tsauto-discovers it (→sandbox.js) andcli-release.ymlauto-uploads the bundle.sh/sandbox/*.shshims for the 9 Docker-capable agents +sh/sandbox/README.md.clouds.sandboxand matrix entries inmanifest.json(9implemented;t3codemissing— no Dockerfile).Remove the beta gate
sandboxfromVALID_BETA_FEATURESand thefast_provisionexperiment bundle.--beta sandboxis now rejected; help text updated.Other
1.0.44→1.1.0(minor — new feature).Notes
cloudNamestays"local"—orchestrate.tshas ~20!== "local"branches (tarball install, repo cloning, restart loops, reconnects) that must treat the sandbox as local execution.useSandboxonly swaps in the Docker-wrapped runner, container lifecycle, and interactive session.Testing
sandbox.test.ts(incl. new cloud-wiring tests),feature-flags.test.ts,manifest-integrity,manifest-type-contracts,update-check.test.ts.biome checkclean on all changed files;sandbox.jsbundle builds; all 9 shimsbash -nclean.cmdRun×2,hetzner) are pre-existing test-pollution flakes that pass in isolation and are unrelated to this change.🤖 Generated with Claude Code