Solved design · 06 of 12 · 10 credits, once

Coding agent platform

A Claude Code-style harness: eight turns per task over a model with a provider fallback, policy-checked tools, sandboxes, context compaction, checkpoints and tracing.

Template
Coding agent platform
Level
Advanced
Reading time
22 min
Topics
Agent harnessStep capsProvider fallbackSandboxesCheckpointsCompactionTracing

In the lab A Claude Code-style harness: eight turns per task over a model with a provider fallback, policy-checked tools, sandboxes, context compaction, checkpoints and tracing. It meets its goals as given (success ≥ 95%, p99 ≤ 180 s). Open it to see how it is put together, then push it: 3x traffic, an attack, a flush, a dead replica, and fix what breaks.

1Context and scope

A coding agent takes a task and loops: think with the model, call a tool (read a file, grep, run tests in a sandbox), look at the result, repeat. Each turn is a model call plus a tool call, so a task multiplies into many calls, and any failed step can fail the task. The harness around the loop checks every tool call against a policy, compacts the context when it grows, checkpoints progress so a crash can resume, and traces every step. This design covers one such platform at browser scale, based on Anthropic’s engineering posts on building effective agents and long-running harnesses.

2Goals and non-goals

Goals

  • 2 tasks a second, each about 8 turns: a model call, a policy check, a tool call, a sandbox run on 40% of turns, a compaction on 15%, a checkpoint and a trace per turn.
  • Success at least 95% of tasks, p99 at most 180 s.
  • A model outage does not fail tasks: calls fall back to a second provider.

Non-goals

  • The editor and terminal integration.
  • Repository hosting and CI.
  • Permission prompts shown to a person.

3Capacity estimate

QuantityValueHow
Model calls≈ 16/s2 tasks × 8 turns
Streams held≈ 16 × 5 s ≈ 80first token 0.6 s plus 400 tokens at 90 a second; 600 streams available
Tokens a minute≈ 11.5M of a 200M quota16 × 12,000 × 60; 9,000 of each 12,000 are cached prefix (not counted)
Sandbox runs≈ 6.4/s at 1.5 s40% of turns: about 10 sandboxes busy of 400
Compounding errors1 − (1 − 0.002)^8 ≈ 1.6%tool errors over 8 turns; the goal allows 5%
Checkpoints and traces≈ 16/s eachone write per turn

The rest of the doc

The design · Key concepts · Alternatives considered · Failure modes and fixes · Try it in the lab · Check yourself · Further reading

Solved design · 10 credits, once

Unlock the Coding agent platform design doc

Every component and why it is there, the capacity numbers behind it, what breaks when you push it and how to fix it, and the same system open in the lab to break and fix yourself. Paid once, on your account.