Which Sandbox Can Recover Before Your Deadline?
Benchmark a clean launch against a checkpoint restart on the same job. Use Docker Sandboxes to test filesystem portability and verify architecture and execution placement separately when comparing Cursor-hosted VMs with self-hosted workers.
Measure recovery to the first correct output
Use a deterministic batch that transforms numbered records and writes one result per record. Save the completion ledger inside the sandbox and keep a copy of the expected result IDs with the test driver. Interrupt the run just before its next checkpoint, then compare a fresh launch that replays the whole batch with a launch that reuses the checkpoint. Stop the timer when the driver has verified the complete result set. Check for duplicate and missing IDs even if the total count matches. Docker Sandboxes can move a filesystem snapshot across local and cloud environments, with a new sandbox ID at the destination. Put test markers on the sandbox filesystem and in any attached workspace you depend on. Inspect both at the destination, then observe whether your worker can reconstruct its progress from the state that arrives.
Move a sandbox | Docker DocsMake architecture and execution placement pass first
Add an architecture-sensitive acceptance test before comparing timings. For example, if your deliverable is an arm64 binary, build the same pinned commit on each candidate and execute the result with a known input on the target architecture. Record the worker architecture, the binary target, and the observed output as three separate facts. Cursor documents amd64 for hosted VMs and directs arm64 workloads to an arm64 self-hosted worker. Test any private dependency from the worker that will actually make the call. For example, fetch a synthetic package from an approved test registry and verify its digest. Cursor keeps the agent loop in its cloud when tool calls run on self-hosted machines, so record tool execution and agent-loop placement separately when reviewing perimeter requirements. Compare recovery times only among candidates that satisfy those requirements.
Choose where Cloud Agents run | Cursor DocsProve a one-shot job can start clean
For a short Python calculation, a browser capture, or a test report, start by testing a fresh runtime per job. Supply an input bundle with the exact dependencies, give the job a deadline, and collect the output outside the runtime before teardown. If you operate Kubernetes, the Kubernetes Agent Sandbox project documents SandboxClaim allocation from a SandboxWarmPool. Test that option with your actual browser or language dependencies and measure setup time separately from task time.
Run the same fixture twice in separate sandboxes. Each run should produce an output that passes the same checks, and the second should begin without files left by the first. A missing browser library, failed artifact export, or dependence on a previous run's cache identifies an acceptance failure you can reproduce.
GitHub - kubernetes-sigs/agent-sandbox: agent-sandbox enables easy management of isolated, stateful, singleton workloads, ideal for use cases like AI agent runtimes and reinforcement learning (RL). · GitHubExercise the kernel feature you need
If a job must build a container image or start a Compose stack, evaluate a VM with a documented guest Docker setup. Docker Sandboxes provides a useful portability check if you expect to move between local and cloud execution. Its snapshot retains the source platform, and the destination must support that platform. Qualify the actual architecture before basing a test on a native dependency or an architecture-specific image.
Pick one small service from your real stack, build it, start it with its actual dependency, and verify that the two services can communicate. Export the artifact and rerun the test from a clean instance on the intended platform. A working language interpreter gives you a baseline. The build and interservice check tell you whether the runtime supports the job you plan to schedule.
Move a sandbox | Docker Docs