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.

Build 1.5 hr Python (stdlib)

Prerequisites: Phase 19 · 25 (verification gates), Phase 19 · 26 (sandbox), Phase 19 · 27 (eval harness), Phase 19 · 28 (observability), Phase 14 · 38 (verification gates), Phase 14 · 41 (workbench for real repos), Phase 14 · 42 (agent workbench capstone)

#Learning Objectives

  • Compose the gate chain, sandbox, eval harness, and span builder into a single agent loop.
  • Implement a deterministic policy that uses read_file, run_tests, and write_file 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.
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.