Design a Sandbox Execution Platform for Coding Agent RL Environments

Last updated: November 29, 2026

Quick Overview

Design the infrastructure that runs coding agents against thousands of real repository tasks, letting each agent edit files and run commands in an isolated environment and returning a test-based reward. It should support both large offline benchmark runs and online RL rollouts for lab clients.

Turing
ML System Design
Machine Learning Engineer
Turing
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design the infrastructure that runs coding agents against thousands of real repository tasks, letting each agent edit files and run commands in an isolated environment and returning a test-based reward. It should support both large offline benchmark runs and online RL rollouts for lab clients.

Turing sells RL environments and benchmarks such as SWE-bench++ built from real-world software tasks, so a reproducible execution layer is core product. The interviewer is probing isolation, reproducibility of rewards, throughput for RL training and how to keep environments trustworthy.

What the Interviewer Expects
  • Defines task format: repo snapshot, environment image, hidden tests, reward rule
  • Uses prebuilt per-task container images for fast, reproducible startup
  • Strong isolation for untrusted agent actions, including network policy
  • Handles flaky tests and reward reproducibility explicitly
  • Scales to many concurrent rollouts with autoscaling and warm pools
  • Protects hidden tests from leakage and reward hacking
Key Topics to Cover
Sandboxing
Containers
Reward reproducibility
RL rollouts
Autoscaling
Reward hacking
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would you detect an agent that edits or deletes tests to get reward?
  • How would you keep rollout latency low enough for online RL with thousands of parallel episodes?
  • How would you version tasks so a client can reproduce a score six months later?
  • How do you price and quota this for different lab clients?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Functional: register tasks (repo at a commit, setup script, problem statement, hidden fail-to-pass and pass-to-pass tests); start an episode; let the agent run tool calls (read, write, shell) through ...

High-Level Design

Task build pipeline: for each task, build a container image with dependencies installed and tests verified to fail before the gold patch and pass after it, run several times to reject flaky tasks. Ima...


Submit Your Answer
Markdown supported

Related Questions