Repository navigation
Conversation
A built-in `mirage` sandbox provider: each deploy_sandbox sandbox is a workspace on a Mirage daemon (Python or TypeScript), driven over its HTTP API with httpx, so it needs no extra. agent-env passes the user's Mirage workspace config through and reads none of it; a step runs whatever that workspace has. A workspace serves no ports, so envs and agents stay on another provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…DME examples - One error class, MirageError, as kosa8 and Agent37 have, carrying the code and errno from Mirage's error body. A missing workspace (not_found, no errno) is SandboxNotFoundError; a file call's ENOENT stays a MirageError. Connection errors are httpx's own. - The workspace every sandbox starts from is built in __init__: the configured workspace, plus a RAM root (an exec mount, so an interpreter can run what a step loads) and lifted command limits where it sets none. - Per-workspace calls share one path that maps a missing workspace; unused health call and fake fields removed. - Imports at module top in the shared tests; the capability check joins the shared branch. - README framed as Mirage virtual terminals, with Examples for the setups tested: no machine, Monty in process, and a Docker container as the compute through a machine mount. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- create_container: the base default calls create_vm with the container's port, which a Mirage workspace refuses
before anything is made ("serves no ports, so it can't expose [port]").
- setup_vm_for_gateway: the base default waits for the VM and opens only the exposed ports, which a workspace has none of.
- MirageApi takes its url from the provider, with no default of its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The default daemon URL is the provider's url default; the client's timeout and the lost answer's -1 sit where they are used. - MirageError reads Mirage's error body itself, with no separate parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cancelled create - Every daemon call has a 60 s timeout, so a delete that gets no answer can't hold terminate or a failed create's cleanup; only a shell line waits for its answer with no read timeout. - The workspace id's suffix length is named, as agent37 names it. - Tests: a create cancelled while the daemon answers deletes the workspace it made, and only a line has no read timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Adds
mirage, a built-in sandbox provider. Eachdeploy_sandboxstep gets its ownMirage workspace, a virtual terminal on a Mirage daemon, driven over the
daemon's HTTP API with
httpx, so it needs no extra.url, an optionaltoken, and an optionalworkspacetable passed to Mirage as is (mounts, machines,env,command_limits).memorythe workspace'smax_memory.exposed_portsand containers are refused; envs and agents stay on another provider.python3ordockerrun on the machines the workspace config names. The README's Examples show nomachine, Mirage's in-process Monty, and a Docker container.
Testing
httpx.MockTransport, Mirage rows in the shared provider tests, and asmoke test gated on
remote_sandbox.mirage-ai0.1.0 release,agent-env run hello --sandbox mirageand the smoke test pass.recorded exit code matching.
Docs site
For the Sandboxes page, in the shape of kosa8's entry. A row after
kosa8:mirageA section after kosa8's:
Logos:
/logos/mirage.svg, and/logos/mirage-dark.svgwithfill: #FFFFFF; stroke: #000000;🤖 Generated with Claude Code
Confidence Score: 5/5

The PR appears safe to merge, with all three previous findings addressed and no new actionable issues found.Summary
Adds
mirageas a built-in sandbox provider backed by a Mirage daemon.deploy_sandboxstep can create a Mirage workspace.Reviews (2) · Last reviewed commit: "fix(sandbox): bound the Mirage daemon ca..." · Reviewed by Greptile