You already know: the code completion engine (code context, latency), the support agent (tools under policy) and the agent platform ideas from the LLM platforms case. This case is the long-horizon version: dozens of steps per task, real code execution, and an output whose correctness is hard to judge.
How to read this lesson. No code, on purpose: the system writes code, but the design discussion is about loops, sandboxes, verification and cost. Numbers marked assumed are assumptions you state out loud; prices are illustrative.
1. The prompt, and the questions that change the design
A mid-level answer describes the agent loop. A staff candidate asks four harder questions: where does the agent run code safely, how do we know the change is right (passing tests is not the same thing), what does a task cost and how long does it take, and what can the agent never do (merge, deploy, read production secrets).
Assumptions you state: