# Code Review as a Principal-Agent Problem

Code review (in the review-then-commit sense — Apache 1990s, Google 2000s, GitHub PR 2010s) is a low-trust collaboration mechanism: a contributor proposes a change, a reviewer LGTMs it, the change lands. It works for teams beyond the two-pizza size and for OSS for a single reason: the reviewer can **cheaply infer the contributor's effort by reading the diff**. The diff is testimony.

When the contributor is an agent driven by a human typing two sentences, that signal collapses. The reviewer can no longer tell whether the contributor:
- Understood the constraints
- Considered alternatives
- Tested edge cases
- Spent thirty seconds or three days

This is the standard **principal-agent problem** ([Wikipedia](https://en.wikipedia.org/wiki/Principal%E2%80%93agent_problem)) — the principal (reviewer) can't observe the agent's (contributor's) effort, and effort costs fall on the principal. Before agents the imbalance was bounded; after agents it's unbounded.

The visible failure modes:
- **OSS slop PRs** — agents generate plausible PRs at zero contributor cost; maintainers burn out responding
- **Internal review queues** — companies that mandate review can't extract agent productivity gains because review bandwidth becomes the binding constraint
- **Reviewer-as-prompter** — reviewers realize they could re-prompt the agent themselves faster than reading the contributor's output

Process responses [[crawshaw-agent-principal-agent]] catalogs:
1. **Small high-trust team, no second reviewer** — human-prompts-agent + human-reviews + human-deploys. Works because the principal *is* the agent. Requires investing in integration/e2e/agent-driven test machinery.
2. **Pre-2005 Microsoft model** — independent teams, QA-driven sync, no mandated review-before-commit. Worked at scale but low-trust BigCos won't reach for it.
3. **The OSS retrofit** — replace "send PR" with "send prompt + feedback loop"; see [[i-dont-want-your-prs]] for Ciężarkiewicz's version.

The unresolved problem is large-company low-trust environments. There is no known process that gets review out of the bottleneck position there; reviewer bandwidth ceilings + doubled review = agents producing little net productivity gain. This is part of [[no-silver-bullet-llms]]'s thesis from a different angle.

Adjacent: [[contributor-poker]] (Cro's frame: bet on the contributor not the contents of the PR — itself a response to the same effort-inference collapse), [[skill-atrophy-supervision-paradox]] (the supervisor-side problem).
