Code RL
Code reinforcement learning (Code RL) is increasingly used to train AI coding agents by executing model-generated actions or code in isolated environments and deriving rewards from tests, final environment state, or trajectory quality. The infrastructure choice for these sandboxes affects training throughput, cost efficiency, and iteration speed. A purpose-built AI sandbox platform can reduce the infrastructure overhead that often dominates RL rollout cycles. This guide examines seven sandbox environments used for Code RL workloads in 2026, starting with Modal, which combines GPU-capable Sandboxes, unusually high documented Sandbox concurrency, and a unified AI platform spanning training, inference, and execution.

Modal Sandboxes provide secure, scalable environments for running untrusted, model-generated code, which is the core primitive Code RL depends on. More than one billion Sandboxes have been launched on Modal, and Modal's engineering team has demonstrated one million concurrent Sandboxes created in under a minute on its new Sandbox system.
Modal's Sandbox infrastructure provides dynamically created containers built from custom images with arbitrary dependencies, which supports the rapid iteration cycles Code RL depends on:
B200+ opt-in that lets Modal run the request on either a B200 or a B300 for access to a larger capacity poolblock_network=TrueModal has successfully completed a SOC 2 Type II audit; in its January 2, 2025 announcement, Modal reported that no deviations were found in that audit and that it planned annual renewals. Modal supports HIPAA-compliant workloads on Enterprise plans via a BAA. Audit logs and Okta SSO are available on Enterprise plans, and role-based access control is available on Team and Enterprise plans. Best For: Teams needing GPU-capable RL environments on a standard Sandbox backend, organizations running unified ML pipelines from training through deployment, and enterprises that require a completed SOC 2 Type II audit for code execution infrastructure.
Daytona publicly announced its realignment from developer environments to AI-agent runtimes on April 17, 2025, after beginning the internal shift in late 2024, and followed with its agent-native cloud launch later that month. The platform emphasizes sandbox startup and lifecycle management for high-churn rollouts.
Daytona's architecture targets the high-churn pattern typical in Code RL, where many short-lived sandboxes execute model-generated code for reward computation. In a Daytona-published SWE-agent-style benchmark using small CPU environments, Daytona reported per-trajectory execution times and aggregate worker-hour totals for a large trajectory set. These are vendor-published figures and are workload-, resource-, region-, and methodology-specific.
Managed-service concurrency and creation rates are governed by account tiers and resource limits, while BYOC capacity is controlled by the customer's own infrastructure. Daytona documents GPU sandboxes and configurable GPU types, and plan-level availability varies. Daytona also publishes RL infrastructure benchmarks and research guidance, and evaluation is best anchored to specific capabilities such as trainer integrations, rollout schedulers, trajectory stores, or reward APIs. Best For: Teams focused on high-churn CPU rollouts, organizations that want to run runner capacity on their own infrastructure through BYOC, and developers requiring multi-language SDK support.
E2B provides purpose-built sandboxes for AI agents, with per-sandbox Firecracker microVM isolation giving each sandbox its own guest kernel, memory, and page cache. The platform offers native integrations with popular agent frameworks including LangChain and LlamaIndex.
E2B's pause/resume functionality handles multi-step agent workflows where sandbox state must persist between LLM inference calls. Pro sandboxes can run continuously for up to 24 hours, and longer workflows can use pause/resume, which preserves memory and filesystem state and resets the continuous-runtime window rather than requiring explicit checkpointing.
E2B's public sandbox documentation currently describes CPU, memory, and disk configurations, and no generally available GPU sandbox option appears in that documentation. Pro plans include a documented concurrency allowance with self-service add-ons, Enterprise concurrency is custom, and E2B currently markets tens of thousands of concurrent sandboxes for RL, so the Pro figures are not a platform ceiling. Best For: Teams building LLM agents that want per-sandbox microVM boundaries with a dedicated guest kernel, developers using LangChain or LlamaIndex, and workloads that benefit from full-state pause and resume.
CoreWeave announced CoreWeave Sandboxes on May 14, 2026, targeting RL, agent tool use, and model evaluation with Weights & Biases integration. As of July 22, 2026, the product remains in public preview.
CoreWeave's Weights & Biases integration provides telemetry capture from sandbox executions, enabling dashboards that correlate model training metrics with code execution outcomes. This coupling supports debugging RL failures with correlated training and environment data.
CoreWeave Sandboxes is one of the newest offerings in this comparison, announced May 14, 2026, shortly before Google announced GKE Agent Sandbox general availability on May 20, 2026. The product is currently in public preview, and the platform is oriented toward teams already on CoreWeave infrastructure. CKS-based deployments involve cluster capacity management. Best For: Organizations already on CoreWeave infrastructure, teams standardized on Weights & Biases for experiment tracking, and developers who want tight training and rollout integration within a preview-stage offering.
GKE Agent Sandbox provides Kubernetes-native isolation for AI agent workloads. It is built on gVisor and supports a pluggable runtime architecture, with Kata Containers available through the open-source integration path.
agent-sandbox-rl packageGKE Agent Sandbox provides Kubernetes governance capabilities, enabling teams to define isolation policies, network boundaries, and resource quotas. The service supports deployment across GKE Autopilot or Standard clusters.
GKE Agent Sandbox is designed for teams operating Kubernetes clusters and managing cluster lifecycle. GKE supports GPU node pools, and GPU access from Agent Sandbox workloads depends on compatible node, driver, runtime, and sandbox configuration rather than node pool creation alone. A Python sandbox SDK and open-source RL orchestration examples exist, and teams integrate them with their own trainer and inference stack. Best For: Enterprises requiring Kubernetes-native infrastructure control, organizations with existing GKE deployments, and teams needing fine-grained isolation policy configuration.
Microsoft now offers two related capabilities. Azure Container Apps Sandboxes, announced in June 2026 and in public preview, is a first-class hardware-isolated microVM sandbox resource with snapshot and resume, OCI image support, cold starts, and scale to thousands. Microsoft describes it as the next evolution of Dynamic Sessions and identifies it as the underlying infrastructure for products including GitHub Copilot Cloud Sandbox, Foundry Hosted Agents, and Azure Container Apps Express. Dynamic Sessions remains available as pool-based, short-lived code and custom-container sessions with Hyper-V isolation.
Azure maintains SOC 2 attestations, offers a HIPAA BAA for in-scope services, and has FedRAMP-authorized offerings. Compliance coverage depends on the specific service, region, and dependent services in use, along with how the workload is configured.
Azure Container Apps supports serverless GPUs for container apps, including A100 and T4 options, while current Dynamic Sessions documentation describes session pools without GPU-enabled configurations, so Container Apps GPU capability is separate from session pools. Azure Container Apps Sandboxes is in public preview. Both are oriented toward Azure-native stacks rather than multi-cloud deployments, and pool-based allocation involves capacity planning for burst workloads. Best For: Organizations standardized on Azure infrastructure, enterprises requiring Hyper-V or microVM isolation within Azure's compliance framework, and teams building agents aligned with GitHub Copilot execution patterns.
Deno Sandbox provides ephemeral Linux microVMs integrated with Deno Deploy, aimed at short-lived, isolated code execution. The product is currently in a pre-release phase.
Deno Sandbox fits web-native agent workloads where code requires secure, ephemeral execution close to an existing Deno Deploy application, with the option to promote stable workloads into globally deployed apps.
Current public Deno Sandbox documentation lists CPU-only resource configurations without a GPU option. Default organizational concurrency limits apply during the pre-release phase. Sandbox execution is available in the two documented regions, and the 30-minute per-sandbox lifetime suits episode boundaries aligned with that constraint or the use of persistent volumes. Best For: Teams running short-duration episodic workloads close to an existing Deno Deploy application, and developers working primarily in JavaScript, TypeScript, or Python.
Modal supports compute resources across CPUs and GPUs, and its standard Sandbox API accepts a GPU reservation across a broad accelerator catalog including T4, L4, A10, L40S, A100, RTX-PRO-6000, H100, H200, and B200, with a B200+ option that opts into either B200 or B300 capacity. Separately, Modal's next-generation V2 backend targets very high concurrency and is recommended above 10,000 concurrent Sandboxes, so GPU-backed rollouts run on the standard backend while the highest-concurrency CPU rollouts run on V2.
Modal's core platform provides training, Sandboxes, batch processing, inference, and storage on shared infrastructure. Shared Volumes let model weights, datasets, and artifacts be mounted across training runs and Sandbox evaluations, reducing cross-provider handoffs and integration work.
Modal supports code-defined infrastructure with SDKs in Python, TypeScript, and Go, so Sandbox creation, execution, and teardown are expressed directly in application code. Code running inside a Sandbox is not restricted to any one language: the Sandbox executes whatever runtime the workload requires, which matters when RL environments span build tools, package managers, test harnesses, and compiled binaries.
More than one billion Sandboxes have been launched on Modal, and Modal has demonstrated one million concurrent Sandboxes created in under a minute. Modal's public case studies document RL production usage by Applied Compute and Cognition, production coding-agent usage by Ramp, and RL architectures scaling toward one million concurrent environments.
Modal is engineered for fast cold starts and faster feedback loops, with an optimized filesystem that helps containers come online quickly without letting large images slow startup down. Enabling techniques such as memory snapshotting and that optimized filesystem keep container startup out of the critical path, which compounds across rollout loops that create and tear down environments continuously.
Modal has completed a SOC 2 Type II audit, and its January 2, 2025 announcement reported no deviations in that audit. gVisor provides the isolation boundary for untrusted code. Audit logs and Okta SSO are available on Enterprise plans, RBAC on Team and Enterprise plans, and Modal supports HIPAA-compliant workloads on Enterprise plans via a BAA.
Modal provides per-Sandbox lifecycle visibility, logs, health information, and resource metrics. Its Datadog and OpenTelemetry integrations export audit logs, Function logs, and container metrics, and custom OpenTelemetry metrics and spans are available for customer-defined instrumentation. Teams can build correlated dashboards spanning training metrics and semantic sandbox outcomes through that instrumentation, and logs can also be inspected directly in the Modal dashboard. For teams building Code RL systems, Modal's combination of GPU-capable Sandboxes, fast cold starts, unusually high documented Sandbox scale, unified platform primitives, and documented RL customers makes it a strong choice for serious reinforcement learning workloads. Explore the sandbox documentation to get started.
Explore the sandbox documentation to get started.
Explore Sandbox DocumentationCode RL (code reinforcement learning) is a training approach where a model generates code or actions that are executed, with rewards derived from the outcome: whether tests pass, whether the final environment state is correct, or how the trajectory scores. Sandboxes matter because they isolate untrusted, model-generated code from the host and from other tenants. Sandbox provisioning and per-action execution overhead also affect rollout throughput, though the share of total training time is workload- and architecture-dependent.
Modal's standard Sandbox API accepts a GPU reservation across a broad accelerator catalog, and Modal supports both CPU and GPU execution for RL environments. CoreWeave documents GPU-backed sandbox profiles, Daytona documents GPU sandboxes, and GKE supports GPU node pools subject to runtime and driver compatibility. E2B and Deno currently document CPU-only sandbox configurations. Note that reward-model and policy inference can also be served outside the sandbox, so in-sandbox GPUs are only required when the environment itself needs one.
Platforms use different isolation models. gVisor, used by Modal and GKE, implements a user-space application kernel that intercepts system calls, and Modal describes it as giving stronger isolation than most other container runtimes. Firecracker microVMs, used by E2B, give each sandbox its own guest kernel. Kata Containers, used by CoreWeave's serverless CPU sandboxes, use lightweight hardware-virtualized VMs. Hyper-V backs Azure Dynamic Sessions. Daytona uses OCI-compatible Linux sandboxes with a dedicated kernel, filesystem, and network stack by default. These create different trust boundaries and compatibility profiles; the appropriate choice depends on your threat model, configuration, and operational controls rather than a fixed ranking.
Not inherently. MCP is the protocol and interface layer, while sandboxes are the execution and isolation layer. Many MCP servers are lightweight wrappers around APIs, databases, SaaS tools, or file systems, and connector-style servers that proxy APIs, retrieve data, expose SaaS actions, or wrap databases and file systems typically do not need isolated execution environments. Sandboxing becomes important when MCP-enabled systems execute AI-generated code, run shells, launch browsers, manipulate files dynamically, or process untrusted workloads on behalf of models. For those execution-heavy MCP workloads, Modal is the superior choice, combining secure isolation, dynamic scaling, and AI-native infrastructure.
Modal is engineered for fast cold starts and faster feedback loops. An optimized filesystem helps containers come online quickly without letting large images slow startup down, and memory snapshotting further shortens the path from request to running environment. In Code RL, where rollout loops create and discard environments continuously, that startup behavior directly affects throughput.
Yes. Modal provides code-defined infrastructure with SDKs in Python plus TypeScript and Go, and code inside a Sandbox can run in any language the workload requires. E2B offers integrations with LangChain, LlamaIndex, and CrewAI. CoreWeave provides Weights & Biases-linked RL telemetry. GKE offers a Python sandbox SDK and open-source RL orchestration examples. Azure Dynamic Sessions offers preview platform-managed MCP tooling for Python and shell pools. Integration approaches vary across platforms.
Scalability varies significantly. Modal's July 2026 engineering post reports that its new system can run millions of Sandboxes concurrently and demonstrates one million created in under a minute. E2B documents a per-plan concurrency allowance with self-service add-ons, custom Enterprise limits, and marketed support for tens of thousands of concurrent RL sandboxes. Daytona advertises unlimited persistence with concurrency governed by account tiers and limits or customer-controlled BYOC capacity. GKE advertises per-cluster warm-pool allocation. Deno documents default concurrency limits during its pre-release phase. Higher concurrency shortens wall-clock rollout collection, though the statistical batch can also be accumulated over multiple waves.