Capstone Lesson 29: End-to-End Coding Agent on the Harness
Track A's payoff. This lesson stitches the gate chain, the sandbox, the eval harness, and the OTel spans into one working coding agent that fixes a real (small, fixture-scale) bug in a multi-file Python project. The agent is a deterministic policy, not an LLM; the substitution makes the lesson reproducible and shows that the harness was the interesting part all along. The contract is identical: a real model plugs in at the policy seam. Compose the gate chain, sandbox, eval harness, and span builder into a single agent loop. Implement a deterministic policy that uses readfile, runtests, and writefile to fix a fixture bug. Enforce a global step budget plus an observation token budget across an end-to-end run. Emit complete OTel GenAI traces and Prometheus metrics for the full run. Verify the agent solves the fixture in fewer than 12 steps with zero gate trips on legal tools. Most agent demos work in isolation: a sandbox by itself, an eval harness by itself, a span emitter by itself. They look fine. Compose them and the seams show. The gate chain says ALLOW but the sandbox refuses for a reason the chain did not anticipate. The eval harness records a pass but the OTel spans say the gate refused a tool the agent claims it used. The Prometheus counter is incremented…
Capstone Lesson 29: End-to-End Coding Agent on the Harness: Track A's payoff. This lesson stitches the gate chain, the sandbox, the eval harness, and the OTel…
This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.
Browse the complete course catalog or open this lesson on GitHub.