Evaluation and QualityAgent task and trajectory outcomesStaff
When does a higher pass@8 score justify an eight-candidate coding-agent product?
By Amit Kumar3 min readWorked answer includedReviewed 26 Sept 2026
The question
Interview question
A coding agent improves a benchmark's pass@8 score but not pass@1. The product normally runs one attempt, shows one patch, and gives the user twenty minutes. Would you ship it? The team proposes generating eight patches and selecting the best with tests.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
Pass@8 asks whether at least one of eight attempts solves a task under the benchmark's success test. The product asks what one user gets from its actual selection process within a deadline. Those are different questions. If attempts were independent with identical success probability p, the chance of at least one success would be 1 - (1-p)^8. In a real agent, attempts share model weaknesses, task ambiguity, and tools, so that simple formula is only an illustration. More importantly, the product does not get an oracle that points to the winning attempt.
For a hypothetical independent sampler with a 20 percent per-attempt success probability, eight attempts give an at-least-one-success probability of 1 - 0.8^8, about 83.2 percent. That does not mean a selector returns a correct patch 83.2 percent of the time. If its available tests accept several wrong patches, candidate generation improved while selection remains unreliable. Measure both the supply of correct candidates and the outcome of the actual selector.
I would first run the current product path: one attempt, the same repository checkout and tool permissions, twenty minute budget, and the same patch validation a user sees. Score whether the issue is fixed, existing behavior survives, the diff is safe, and the patch can be reviewed. Measure time, tool calls, cost, and rate of abandoned or partial runs. A benchmark pass is one useful signal, not a complete release gate. SWE-bench Verified's original description explains its test based issue resolution setup. Anthropic's infrastructure noise analysis shows why harness configuration can move coding eval scores. Neither says our users' repositories behave like that benchmark.
The eight patch proposal changes the product, so evaluate that product. Can we run the attempts independently without sharing a dirty workspace or exhausting one tool quota? Which tests are available before selection? Does a passing test distinguish two patches that both satisfy the visible cases but one breaks a hidden contract? The selector must run under the same twenty minutes and count all eight attempts, test executions, and merge work. If it picks by a judge, evaluate that judge on patches it did not help generate. Report success of the selected patch, not the best patch found in hindsight.
Maybe eight attempts are parallel and finish in time. That can be worth buying on a hard slice. It can also create eight nearly identical patches, saturate CI, and make one unsafe patch look attractive because it changes a test. Try a small fixed retry budget triggered by a meaningful failure signal, or a different tool strategy for the cases where pass@1 is low. A good selection system needs diversity and a credible verifier, not just more samples.
The interviewer then points out that the benchmark tests may have leaked into model training or be too narrow. That is another reason to treat the headline score cautiously. OpenAI's 2026 analysis of SWE-bench Verified reports contamination and test validity concerns for frontier progress measurement. I would use private, fresh tasks from our workflows with hidden independent checks and human review of a subset. Do not publicly claim a benchmark is invalid for every use or that any one replacement is perfect.
If pass@1 is flat, selected-patch quality is flat, and cost grows, I would not ship this change for the one attempt product. If the eight attempt system wins on a hard, valuable slice within the user deadline and passes safety gates, I might route only that slice to it. The unit of value is the patch the user receives, with the time and effort it cost to get there.
Related questions
- How would you evaluate an agent when several different action sequences can solve the task?Principal
- How would you make an agent evaluation repeatable when its tools read and modify changing state?Principal
- How should you randomize and measure an online experiment for a multi-day, multi-turn agent?Principal
Keep practising evaluation and quality
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux