Interview Process & Behavioral·Question 42 of 56Advanced

Your team now writes most new code with coding agents. As tech lead, what changed in how you review, test and own that code?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

The person who merges the code owns it, review shifts from reading lines to checking intent and evidence, and tests become the thing humans guard most closely. Agent-heavy teams rarely fail because the average diff is bad. They fail because review load explodes, plausible-but-wrong code slips through, and six months later nobody can explain a module.

Full worked answer with diagram

The person who merges the code owns it, review shifts from reading lines to checking intent and evidence, and tests become the thing humans guard most closely. Agent-heavy teams rarely fail because the average diff is bad. They fail because review load explodes, plausible-but-wrong code slips through, and six months later nobody can explain a module.

What changed on my team:

  • Ownership is explicit. "The agent wrote that" is not an answer in a postmortem.
  • Intent before code. Non-trivial changes start with a short written goal and acceptance tests, so the reviewer checks the diff against a stated aim instead of reverse-engineering one.
  • Small diffs, enforced. Agents will happily produce a 1,500-line PR. We capped reviewable size and asked for stacked changes, because review quality collapses with size.
  • Tests are protected. The failure we actually hit was an agent making a red test green by loosening the assertion. Any change to existing tests or snapshots now gets flagged for separate review.
  • Hard gates on new dependencies, network calls and auth code: a human who understands them, plus automated scanning on every PR.
  • Measured, not assumed. We tracked revert rate, escaped defects and review time per PR before and after. Throughput rose clearly. Escaped defects rose for the first month, mostly from oversized PRs, and fell back once the size cap landed.

What stayed human: architecture, data model changes, anything irreversible in production, and the decision about what not to build.

Pitfalls: banning agents outright, which reads as out of touch; "the agent writes the tests too, so we're covered", when it can write tests that confirm its own bug; no metric showing quality held; treating a green CI run as a substitute for review.

Worth sketching. It shows where human attention is spent once drafting is cheap.

flowchart LR
    A["Written intent plus<br/>acceptance tests"] --> B["Agent drafts<br/>a small diff"]
    B --> C["CI: tests, scans,<br/>size cap"]
    C --> D{"Touches existing tests<br/>or adds a dependency?"}
    D -->|"yes"| E["Extra human review"]
    D -->|"no"| F["Owner reviews diff<br/>against intent"]
    E --> F
    F --> G["Merge, owner accountable"]

What a good answer covers

  • The person who merges the code owns it, review shifts from reading lines to checking intent and…
  • Agent-heavy teams rarely fail because the average diff is bad
  • They fail because review load explodes, plausible-but-wrong code slips through, and six months later…
  • Ownership is explicit
  • Intent before code

Key terms: Pitfalls

Interviewer follow-ups to expect

  1. Someone has already merged a 2,000-line agent-generated PR. What do you do?

  2. How do you keep juniors learning when an agent writes the first draft?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep