AI coding assistants are very good at writing code that looks right. That is exactly the problem. The diff reads cleanly, the variable names are sensible, the tests are green, and a reviewer approves it in thirty seconds. Then it hits production data and production traffic, and the endpoint that was fine on a laptop is suddenly your slowest route. The code was plausible. It was never verified.
We hear a version of this from teams shipping AI-assisted code every week: not “the AI wrote something broken,” but “the AI wrote something that worked until it didn’t.” The failure mode has shifted. The bugs that get through now aren’t syntax errors or obvious logic mistakes, because the model is good at those. They’re the things a model can’t see: your schema, your indexes, your traffic shape, and the reason that one weird line was there in the first place. Here are four we see constantly.
The N+1 That Got Approved In Thirty Seconds
Ask an assistant to “add the author’s name to the posts endpoint” and you will often get something like this:
posts.map { |p| { title: p.title, author: p.user.name } }
It is readable. It is idiomatic. It passes review instantly. And it fires one query per post, because p.user is a separate database round trip for every row. On a page with 200 posts that is 201 queries where there should be two, and the endpoint’s p95 climbs from 80ms to over a second. The reason it slips through is that the test suite ran against three fixtures, so the query count looked fine and nobody noticed the shape. The model had no way to know the page renders hundreds of rows in production.
The Index It Didn’t Know Existed
An assistant adds a lookup: User.where(email: address). On the development database with a few hundred users, it returns instantly. In production, email is only covered by a case-insensitive functional index that the model never saw, so the query falls back to a sequential scan across eight million rows and adds 400ms to every single login. Nothing in the diff hints at it. The code is correct; it is just correct against a schema the assistant was guessing at.
The Load-Bearing Cache It “Cleaned Up”
Asked to tidy a messy method, an assistant removes a cache.fetch wrapper it judged unnecessary and inlines the logic for readability. The refactor genuinely looks cleaner. But that method runs forty times per request, and the cache was the only thing standing between it and an external pricing API. Now every call goes out over the network, p95 triples, and the diff that caused it is the one that looked like an improvement. Comments and caches that exist for non-obvious reasons are precisely the context a model doesn’t have.
The Double Email
This one we wrote about just last week. An assistant moves a Mailer.deliver call inside a database transaction block, which is reasonable-looking until you remember the transaction can retry after a dropped connection. The send isn’t idempotent, so on a retry the customer gets two emails. As one developer put it in the comments on that post, double emails are a fun way to find out your transaction retried. Side effects inside a retryable block are a classic trap, and a model reaching for the tidiest-looking structure walks right into it.
Where You Actually Catch These
Notice the pattern across all four: each one passed code review and passed tests. The dev couldn’t see the regression, and neither could the model, because the information that would have revealed it lives in production, not in the diff. That is the gap AI-assisted development widens. More code is shipping, faster, with fewer humans deeply familiar with each line, and the only place the truth shows up is under real load and real data.
This is why we think monitoring matters more in an AI-assisted workflow, not less. The job is to close the loop: surface the regression where the work now happens. That means catching the slow query or the N+1 at the pull request, and it means making your production errors, logs, and traces queryable by the assistant itself through Scout’s MCP server, so when an agent goes to fix something it is working from what your app actually did, not from a guess. The developer still makes the call on whether the code is good. Scout gives them the evidence to make it fast.
AI made your team faster. Our job is to make sure the fast code stays fast. Get started with Scout for free and point it at whatever your assistant shipped this week.
For application monitoring with errors, logs, and traces, Scout Monitoring provides the fastest insights without the bloat.