Skip to content

Interview question · Agentic System Design

Design a background coding agent for ten thousand engineers.

An engineer assigns a ticket and comes back to a pull request. Behind that: a sandbox per task, the repository's own build and tests, credentials kept outside, a verification loop, a reviewable diff, and a platform that runs thousands of these at once.

expertEssentialNewUpdated Nov 2026

TL;DR: Each task runs in its own isolated sandbox (microVM) restored from a per-repository snapshot, with the repository's instructions, build and tests. The agent explores with search and a code index, edits with strict search-and-replace blocks, verifies with the cheapest relevant checks then the full suite, and opens a pull request through a trusted push service; it never holds credentials. A scheduler with warm pools, per-team quotas and fleet caps runs thousands of tasks; traces, cost and reviewer acceptance are measured per repository; and tests, CI configuration and protected paths are read-only to the agent.

How to approach it

Clarify scale and the definition of done (a mergeable pull request), then design the task lifecycle, the sandbox and credentials, the agent loop, the platform, and how quality is measured and improved.

A strong answer

Clarify. 10,000 engineers; perhaps 5,000 tasks a day, peaking at 1,000 an hour; median task 20 minutes; dozens of languages; done means a pull request that passes CI and a human review.

Task lifecycle. Ticket or chat request → task record (repository, branch, description, requester) → scheduled into a sandbox → agent runs → pull request with summary and evidence → reviewer merges, comments (agent can iterate) or closes.

Sandbox. MicroVM per task, restored from a snapshot with dependencies installed; scratch workspace; egress only to the package proxy and internal brokers; read access to the repository via a broker; pushes via a push service that checks branch, CI-file changes and size.

Agent loop. Repository instructions and map first; exact and structural search; edits as search-and-replace blocks; checks in cost order (format, type check, nearby tests, full suite at the end); failure signatures to detect spirals; tests and CI configuration read-only unless the task is about tests; diff budget relative to the task.

Platform.

from math import ceil, sqrt

def capacity(peak_per_hour, median_min, prepare_s=15, z=2.33):
    concurrent = peak_per_hour / 60 * median_min
    warm = peak_per_hour / 3600 * prepare_s
    return ceil(concurrent), ceil(warm + z * sqrt(warm))

running, warm_pool = capacity(1_000, 20)
print(running, warm_pool)  # => 334 9

About 330 sandboxes running at peak (plan headroom above that) and a small warm pool per common image, because restoring a snapshot is quick. Per-team quotas, per-task budgets (time, tokens, spend), fleet caps and a kill switch sit in the scheduler.

Quality. Per repository: task success (pull request merged), reviewer acceptance and rework rate, CI pass rate on first push, diff size against task type, gaming flags, cost and time. An internal evaluation set mined from past fixes runs on every agent or model change.

Feedback. Reviewer comments go back to the agent as a new task iteration; recurring review comments become repository instructions.

What interviewers probe next

"Monorepo or thousands of repos?" Snapshots per repository and per hot package in a monorepo; the code index service is shared.

"How do you keep agents from flooding reviewers?" Quotas per team, a minimum quality bar (CI green, diff budget) before a pull request is opened, and metrics on review load.

"Security reviews of agent changes?" The same as human changes, plus flags for dependency additions, permission changes and files that affect CI.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

Your background coding agent runs each task in a microVM and opens pull requests through a push service.

  1. Start here

    What if a team's tests take 90 minutes?

How it's scored

Weak: An agent with shell access to a shared build machine.

Hire: Sandboxed tasks, a verification loop and pull requests for review.

Strong Hire: Defines done and scale, designs the lifecycle, isolates with microVMs and snapshots, keeps credentials outside with brokers and a push service, protects tests and CI files, sizes concurrency and warm pools, adds quotas, budgets and caps, measures merge, rework, review load and gaming per repository, and feeds review back into instructions.

Common mistakes

  • Shared machines or long-lived sandboxes across tasks.
  • Tokens inside the sandbox.
  • Measuring only pull requests opened.
  • No quota, so reviewers drown.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 6, and the site remembers where you stopped in each one.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in raises your free answers from 5 to 6 per topic, adds an applied lesson in every topic and easy practice tests, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

Nobody has commented. Post a correction or another way to answer.