<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l" -->

---
title: On reviewing AI-generated code | daily.dev
description: Reading every line an AI agent writes does not scale, so control should be partitioned rather than given up. Tools handle the mechanical checks: formatting,...
canonical: https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: On reviewing AI-generated code | daily.dev
og:description: Reading every line an AI agent writes does not scale, so control should be partitioned rather than given up. Tools handle the mechanical checks: formatting,...
og:url: https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l
og:image: https://api.daily.dev/og/posts/eUNOGzl7L.png
og:image:alt: On reviewing AI-generated code
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# On reviewing AI-generated code

**[Foojay.io](https://daily.dev/sources/foojayio)** · 6 min read · 1 upvotes · 1 comments

## Summary

Reading every line an AI agent writes does not scale, so control should be partitioned rather than given up. Tools handle the mechanical checks: formatting, nullness, common bug patterns and whether tests are sensitive to changes. Humans keep intent (the spec and its tests), boundaries (public APIs, security perimeter, data model) and irreversible actions like migrations. Tools miss wrong requirements, concurrency bugs, performance regressions and architecture drift. Nicolas Frankel's guardrails are instructions given before generation, typed languages with linters, unit, integration, property-based and mutation tests, and post-generation review with a challenger subagent and /code-review.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://foojay.io/today/reviewing-ai-generated-code>

## Questions this post answers

### Is it realistic to review every line of code an AI agent writes?

No. An agent produces code far faster than anyone can read it, and research on peer review found defect detection drops sharply beyond a few hundred lines per hour. If an agent writes a thousand lines while you grab a coffee, you will read them badly or not at all. Reading was only ever a means of getting guarantees about the code.

_Developers shipping AI-assisted code follow review practices like these on daily.dev._

### What should humans still review when AI agents write most of the code?

Humans should own three things: intent (the specification and the tests encoding it), boundaries (public APIs, security perimeter, data model), and the irreversible (database migrations, deletions, anything with a large blast radius). Tools handle formatting, nullness, common bug patterns and test sensitivity. If the agent writes both code and tests, nobody has checked intent.

_Teams deciding how much to trust AI agents track these review patterns on daily.dev._

### What automated guardrails can I put around AI-generated Java code?

Start with instructions the agent reads before generating, such as coding conventions and forbidden patterns. Add a statically typed language, a linter and static analysis, then unit, integration, property-based and mutation tests. Afterwards run post-verification: a challenger subagent for plans and a code-review command for code. Earlier guardrails catch problems more cheaply.

_Anyone hardening an AI coding workflow can keep up with testing practices on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@parsam** · 0 upvotes

> tbh most of what he says tools miss can be caught before review even starts. a retry with no backoff or a call with no timeout shows up in the code, agent just doesnt look for it. we hook [tomosu](https://tomosu.ai/?utm_source=dailydev&utm_medium=comment&utm_campaign=frankel-review) into the agent over MCP for that

## Similar posts on daily.dev

- [Stop checking AI-generated code. Start generating less of it](https://daily.dev/posts/stop-checking-ai-generated-code-start-generating-less-of-it-gjhevl9dm) · InfoWorld · 3 upvotes · 0 comments
- [Agentic Code Quality](https://daily.dev/posts/agentic-code-quality-7iuckhife) · Addy Osmani · 57 upvotes · 6 comments
- [Human Maintainable Code in the Age of AI Agents](https://daily.dev/posts/human-maintainable-code-in-the-age-of-ai-agents-ilzajja2s) · Atomic Spin · 12 upvotes · 1 comments
- [GenAI-based development platform](https://daily.dev/posts/genai-based-development-platform-amtrdhklf) · Microservices.io · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#java](https://daily.dev/tags/java), [#ai-coding](https://daily.dev/tags/ai-coding), [#mutation-testing](https://daily.dev/tags/mutation-testing)

[View this post on daily.dev](https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"On reviewing AI-generated code","url":"https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l"},"datePublished":"2026-11-27T00:13:02.341Z","dateModified":"2026-11-27T00:13:23.131Z","description":"Reading every line an AI agent writes does not scale, so control should be partitioned rather than given up. Tools handle the mechanical checks: formatting,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/30deaf19e2e2a2f40feb193c92daf733?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/30deaf19e2e2a2f40feb193c92daf733?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Foojay.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Foojay.io","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1820f6a6ae944760aa322b67ed85f848","url":"https://daily.dev/sources/foojayio"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"ai-agents,java,ai-coding,mutation-testing","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Foojay.io","item":"https://daily.dev/sources/foojayio"},{"@type":"ListItem","position":3,"name":"On reviewing AI-generated code"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l","comment":[{"@type":"Comment","text":"tbh most of what he says tools miss can be caught before review even starts. a retry with no backoff or a call with no timeout shows up in the code, agent just doesnt look for it. we hook tomosu into the agent over MCP for that","datePublished":"2026-11-27T18:37:31.392Z","url":"https://daily.dev/posts/eUNOGzl7L#c-fcE73DeOR","author":{"@type":"Person","name":"Parsa","url":"https://daily.dev/parsam","image":"https://media.daily.dev/image/upload/s--A3vRIwa4--/f_auto,pg_1/v1794809435/avatars/avatar_BRViZhKjWkcnXBtEKgaIZ?_a=BAMAMiiw0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/on-reviewing-ai-generated-code-eunogzl7l#faq","mainEntity":[{"@type":"Question","name":"Is it realistic to review every line of code an AI agent writes?","acceptedAnswer":{"@type":"Answer","text":"No. An agent produces code far faster than anyone can read it, and research on peer review found defect detection drops sharply beyond a few hundred lines per hour. If an agent writes a thousand lines while you grab a coffee, you will read them badly or not at all. Reading was only ever a means of getting guarantees about the code. Developers shipping AI-assisted code follow review practices like these on daily.dev."}},{"@type":"Question","name":"What should humans still review when AI agents write most of the code?","acceptedAnswer":{"@type":"Answer","text":"Humans should own three things: intent (the specification and the tests encoding it), boundaries (public APIs, security perimeter, data model), and the irreversible (database migrations, deletions, anything with a large blast radius). Tools handle formatting, nullness, common bug patterns and test sensitivity. If the agent writes both code and tests, nobody has checked intent. Teams deciding how much to trust AI agents track these review patterns on daily.dev."}},{"@type":"Question","name":"What automated guardrails can I put around AI-generated Java code?","acceptedAnswer":{"@type":"Answer","text":"Start with instructions the agent reads before generating, such as coding conventions and forbidden patterns. Add a statically typed language, a linter and static analysis, then unit, integration, property-based and mutation tests. Afterwards run post-verification: a challenger subagent for plans and a code-review command for code. Earlier guardrails catch problems more cheaply. Anyone hardening an AI coding workflow can keep up with testing practices on daily.dev."}}]}
```

