Skip to content
Back to Courses
Prof Rod Avatar
Intermediate

Evaluating Coding Agents: Acceptance the Agent Cannot RedefineEvaluating Coding Agents: Acceptance the Agent Cannot Redefine

Decisions about coding agents rest on one number: how often the agent's change passes a check it could not influence, on tasks fixed in advance, with a 95 percent binomial interval. Lesson 1 derives it from the dark-factory idea, where the evaluation is the only review, and covers specification gaming and reward hacking. In lesson 2 you run a small Python harness with an acceptance suite pinned by hash. It shows four real OpenAI Codex runs, one with a defect its own eight passing tests missed and the protected suite rejected, a gamed candidate refused before it runs, and a rescoring after the suite was strengthened, and says what four runs cannot show. Lessons 3 to 9 extend the same factory, one stage each, with code you run and a receipt for each: environment preparation, a reviewable change, integration of two correct changes, a release bound to the tested digest, failure handling, measurement over saved runs, and a written supervision policy. Lesson 10 puts a stand-in vendor agent behind a boundary and grades six edits of the desk that calls it, five rejected and one accepted. Candidates for those stages are hand-written, except the four Codex runs, and each lesson says so.

OutcomeYou leave with: a small software factory in plain Python: it grades a real coding agent's work against a suite the agent cannot edit, rejects a defect the agent's own tests missed, refuses a candidate that games the check, separates environment failures from rejections, integrates two changes without losing one, releases exactly what was tested behind an approval the builder cannot give, survives a stall and a duplicate request, reports a measured pass rate with its interval, and applies a written supervision policy

121 min read
10 lessons
Rod Rivera

Rod Rivera

Professor

Desk

First lesson open
Start the first lesson

Every lesson is free. Lessons marked open need no account; the rest open once you register.

evaluating coding agentsevaluationreward hackingcoding agentsdark software factories

What You'll Learn

  • Why an evaluation of a coding agent needs acceptance the agent cannot redefine, a fixed task set, and a pass rate with an error bar
  • How to derive the 95 percent binomial interval for a pass rate, and why it fails at small n and near 100 percent
  • Why an agent that can edit its own check will pass it, and how specification gaming and reward hacking name that failure
  • How to keep an acceptance suite out of the agent's reach, and pin it so nobody edits it in passing
  • Why the agent's own passing tests are recorded and never trusted
  • Why a handful of runs is not a pass rate, and why every candidate is rescored when the grader changes
  • What "dark software factory" means, and why it makes the evaluation the only review
  • Why a missing dependency is NOT_READY and never a REJECT, and what an environment file does and does not control
  • How to turn an agent's finished folder into a candidate and a review packet, and keep its summary labeled as a claim
  • Why two changes that each pass their own acceptance can still lose one when merged, and how a base digest and a replay of earlier suites stop it
  • How to bind a release to the digest that was tested, and why the approver list must be a file the builder cannot write
  • How to tell a stall, a crash and a duplicate request apart from a verdict, and why a rejection is never retried
  • How to report accepted-when-run, accepted-now, escaped defects and time over saved runs, leave unrecorded fields blank, and compute how many runs a claim needs
  • How to tie supervision to evidence, with promotion on a lower bound, demotion on one escape, and refusal of any proposal that edits the gate
  • Why a vendor agent's answer is advice, how to put the check on the line between that answer and the next action, and what a suite written after the edits cannot see

Prerequisites

  • Python, enough to read a 100-line script and a unit test
  • A terminal and Python 3.9 or newer. No container engine, no API key and no account are needed for the opening unit
  • Enough probability to follow a mean and a variance; the lesson derives the rest
  • Helpful, not required. The Codex course in this track, or the Claude Code course, for operating a coding agent

Syllabus

Prof Rod Avatar

Read the rest of Evaluating Coding Agents: Acceptance the Agent Cannot Redefine

The first lessons need no account. Sign in free to read the rest and keep your place on any device.