arXiv:2610.39711cs.DCOct 2026

Manuscript Offprint

arXiv:2610.39711

Sandman: Building and Operating Sandboxes for Agentic Reinforcement Learning on Shared Kubernetes

Yiming Yan, Hongyang Wang, Wenbo Chen, Xuan Wang, Jingguo Liu, Xian Li, Chen Qi, Leo Fan, Siwei Li, Qianli Wu, Yichuan Li, Ruochen Wen, Qian Qu, Zheshen Wang, Benoit Dumoulin

ABSTRACT

Agentic reinforcement learning (RL) often requires repeated tool calls in task-specific environments. A training job may create thousands of these environments in bursts while sharing a cluster with other jobs. We present Sandman, a sandbox service built and operated at Amazon for agent tool execution and evaluation. It serves multiple production agentic RL workloads on shared Kubernetes. A training framework supplies a task image and uses commands and file operations in the returned sandbox. Files and processes persist across calls until the framework releases the environment. Sandman manages creation, readiness and cleanup. Each sandbox is a Kubernetes pod with a small daemon mounted into the unmodified image. In a scale test, Sandman held 11,858 concurrent tiny sandboxes. Four production SWE-bench Verified training campaigns created 3.1 million sandboxes in October 2026. We report the design trade-offs and operational lessons from handling creation bursts, preparing task environments, reclaiming abandoned sandboxes, and running evaluation under controlled conditions. We will open-source Sandman's daemon, provider and pool.

1 INTRODUCTION

Agentic reinforcement learning (RL) trains agents through repeated interactions with task environments. Tools run commands and file operations in sandboxes whose state persists across calls. Training jobs acquire these environments for rollouts and evaluation, then release them when finished.

Sandbox demand is large and bursty: in our software-engineering (SWE) campaigns, a training run starts dozens of rollouts within a second, and many runs share the cluster (Figure 1a). We first ran Python and math rollouts on a managed code-interpreter service. It could not run task images, which ruled out SWE tasks, and when a batch of rollouts recycled its sessions together, throttled calls timed out trajectories (§4.1).

We present Sandman, the sandbox service our team built and operates on a shared Amazon Elastic Kubernetes Service (EKS) cluster (Figure 2). It serves multiple production agentic RL workloads. A training framework hands it a task image, runs commands, file operations and tests in the returned sandbox across tool calls, and releases it. Sandman manages creation, readiness and cleanup independently of the model. Training shapes this service: creates arrive in bursts, large images are slow to pull, timeouts and cancellations leave sandboxes behind, prewarmed pods sit idle, and grading needs controlled run conditions ( §2–4§2–4). We use SWE training as a running example and the primary evaluation workload.

Each sandbox is an ordinary pod on the cluster's CPU nodes, started from the task's unmodified image with a small daemon mounted in; Sandman adds no node daemon or container runtime. A provider creates, paces, spreads and deletes the pods and owns each create until its pod is handed out or deleted, even after its caller gives up. A per-job pool paces creates and may prewarm pods. Our SWE integration grades each patch in a separate pod, never-used by default, after a probe checks the declared run conditions it can read. Production here means daily internal use for model development, with no external customers or service-level agreement; our training campaigns, sets of training runs, predate several mechanisms this paper describes (Table 4).

This paper makes four contributions:

  1. Sandman, a service that turns a task image into a stateful sandbox a training framework acquires, uses across tool calls and releases, built from ordinary pods on a shared training cluster, whereas purpose-built fleets (Huang et al., 2026) and hosted runtimes (E2B, 2026; Modal Labs, 2026; Daytona, 2026) run their own infrastructure. Sandman held 11,858 concurrent

∗^{*}Equal contribution. Correspondence to: Yiming Yan yyiming009@gmail.com.

Preprint.

(a)

Figure

(b)

(c)

(d)

Figure 1. What a sandbox service for agentic RL faces (production records). (a) Creates per second around campaign A's largest burst, when two runs started together. (b) One campaign-D rollout sandbox of median life and tool-call count. (c) Where rollout-sandbox time went in campaigns C and D (sampled traces). (d) Cumulative fraction of gaps between requests for one image in a run of campaign A.

tiny sandboxes in a scale test, and in October 2026 four production SWE campaigns, 122 runs on up to 432 B200 GPUs, created 3.13 million sandboxes on it ( §5.1§5.1, §5.2§5.2).

  1. Design considerations for RL training sandboxes, each with its cost: where to run them, how to create and place them, when to prewarm, who owns cleanup, how to keep grades valid and how to isolate them ( §4§4).

  2. An open-source release of Sandman’s daemon, provider and pool, to be published.

  3. Measurements and lessons from production and controlled runs: what bounds startup, what prewarming buys and costs, where sandbox waits fall in training, and the failures we met ( §5§5, §6§6).

References (25)