PreviewYou're previewing CTO AI Forge. Sign in to use it.Sign in
← All decisions
AI security in code

How much AI-written code needs human review?

When it comes up

When AI-authored share rises, when review becomes a bottleneck, when agents start opening many PRs, or after an incident involving AI-written code.

Your options

Deep human review of every change

Fits when: Early adoption, weak tests, regulated or safety-critical systems.

Watch out: Review becomes the bottleneck; reviewers fatigue and start skimming anyway.

Risk-tiered review

Fits when: You can classify code paths by impact and have good automated checks.

Watch out: Tiers must be maintained; misclassified paths slip through with light review.

Automated gates plus AI first-pass review, human approver for all merges

Fits when: Strong tests, scanning and small PRs are in place; you want to scale agent output.

Watch out: Rubber-stamping risk; automation can miss design and business-logic flaws.

How to decide

  1. Classify code by risk (what it touches): low (tests, docs, mechanical changes), medium (feature code), high (auth, payments, crypto, data migrations, infrastructure, public APIs).
  2. Make automated gates non-negotiable for all code: tests, SAST, dependency and secret scanning, size limits.
  3. Set review depth per tier, and require a named human approver for every merge.
  4. Watch the signals each period: review time, change-failure rate, vulnerabilities per 1,000 lines, duplication.
  5. Tighten or relax tiers based on the evidence.

Trade-offs

Deeper review lowers risk but caps throughput and burns out seniors; lighter, tiered review scales with AI output but depends on strong automation and correct risk classification.

Real examples

What to check first

  1. Are tests, SAST, dependency and secret scanning required checks on every PR?
  2. Have you classified code paths by risk?
  3. Is every merge approved by a named human?
  4. Is review time or change-failure rate rising as AI share rises?

Learn and use

Sources

Last reviewed 2026-10-01.