---
title: '7 Things AI Coding Agents Get Wrong (Because You Let Them)'
source: 'https://youtube.com/watch?v=oFtTodDCbkE'
video_id: 'oFtTodDCbkE'
date: 2026-11-10
duration_sec: 836
channel: 'ArjanCodes'
---

# 7 Things AI Coding Agents Get Wrong (Because You Let Them)

> Source: [7 Things AI Coding Agents Get Wrong (Because You Let Them)](https://youtube.com/watch?v=oFtTodDCbkE)

## Summary

This video discusses seven common mistakes AI coding agents make and provides practical strategies to prevent them. The speaker emphasizes that many issues stem from how developers prompt and guide the AI, rather than the AI itself being faulty.

### Key Points

- **AI Changes Unrelated Things** [00:02] — An example where a simple landing page update also changed the favicon, demonstrating that AI agents may not make minimal changes.
- **Outdated Patterns and Syntax** [01:34] — AI often generates code using outdated Python patterns like `typing.List`, `Optional`, and old-style generics, even when newer syntax is available.
- **Making Up Missing Requirements** [03:22] — When prompts are vague (e.g., 'add authentication'), the AI fills in gaps with assumptions that may not match your needs. Writing a PRD helps clarify requirements.
- **Changing Unrelated Things** [05:46] — AI agents may optimize for their own goals rather than minimal changes. Providing explicit constraints (e.g., 'don't change branding') helps prevent this.
- **Trying to Generate Too Much at Once** [06:43] — Large prompts create huge diffs that are hard to review and lead to architectural mistakes. Breaking work into small slices and verifying each step is recommended.
- **Poor Design Decisions** [08:20] — AI can compound design issues, like adding more `else` statements to a long function. Guiding AI with prescriptive design advice or exploratory questions helps improve the design.
- **Code That Looks Right but Fails** [10:54] — AI can produce plausible code that misses edge cases. Using tools like Pytest, Ruff, and Pyright as guardrails is essential.
- **Confusing Completion with Quality** [11:50] — Working code isn't necessarily quality code. It may duplicate logic, add dependencies, or increase coupling. Using AI as a code reviewer can help, but you are the final authority.

### Conclusion

The key takeaway is that AI coding agents are powerful but require active guidance and oversight. By writing clear prompts, providing constraints, breaking work into small steps, and using quality tools, developers can significantly improve the output of AI agents.

## Transcript

to update my website's landing page. Just some small text changes and added a couple of images. It did that, but it also changed the favicon for some reason. Here's part of that commit. It changed a bunch of
things in the favicon. Actually, it looks exactly the same before and after. I've no idea why it did that, and I've no idea what actually changed. And by the way, this is not going to be some AI bashing videos. I mean, those are fun as
well, but this video is going to be a bit different. I think AI is actually incredibly helpful for coding work, and I use it a lot. But, in many cases, the reason a coding agent gets something wrong is actually because of us. So,
today we're going to talk about seven things that AI coding agents get wrong, and I'll teach you a few practical ways to prevent those things from happening in the first place. Another thing you may notice, if you're a regular viewer,
different office. Yes, I got out of prison. And unlike Andy Dufresne, I didn't have to become a crook. Let me know if you got that reference. Anyway, this is what my videos are going
to look and sound like from now on. I mean, I might tweak a few things, you know, a little plant, some lights, but I'm going to keep it minimalistic. I'm applying the KISS design principle now everywhere. I highly recommend it. And
if you're new here, welcome. I'm Arjan. I talk about software design and Python, sometimes a bit of AI, but not hype-driven like the latest model that's really going to make you obsolete. I don't really care about hype. I just
want to help you grow in your software development career. The first thing that AI coding agents often get wrong is using outdated patterns and syntax. For example, here I have a bunch of code. You already see that my linter gives me
all sorts of warnings here, but there is a generic repository, there is some user data class, main function. I mean, it's not syntactically wrong or something like that, but it just uses a bunch of outdated things
just uses a bunch of outdated things like type bar for example or it imports uppercase list from the typing module. It still uses the optional type. Now we have lowercase list support since Python 3.9. So you don't need to import this
anymore. Python 3.10 and later support the or sign type or none and with Python 3.12 we got whole new syntax for generics which is much better. So this
may be what AI generates in some cases, but the modern Python way is actually much simpler, much cleaner. There's lots less imports. This all looks a bit shorter. We don't have to type bars anymore and so on and so on. Now I'm not
latest version of Python. I mean sometimes we just have to use an older version which is of course fine, but if you can use newer syntax like this then do it because overall it's just going to be much shorter and you don't build in
technical debt immediately into your code base. Now I do notice nowadays AIs tends to use less of this uppercase list. That seems to slowly disappear, but old style generics are regularly popping up in any Python code that I
generate. Even if I specify the project supported Python version. So make sure you check these things and enforce these conventions with tools like rough where you can. Second thing that I noticed
that happens with AI coding is that it makes up missing requirements. And that has a lot to do with the way that you prompt it. For example, if you ask it add authentication to your app. So then you don't specify how it should do that.
Should it use sessions or tokens? Should it use OAuth or passwords or magic link sent by email? How do you store these credentials? What are the permissions? Etc. The agent is going to fill in all of these gaps for you and it's not
necessarily going to pick what you need. Now to avoid this the simple answer is to just write better more specific prompts, but if you have a substantial feature write a PRD, product requirements document. And there you can
constraints, acceptance criteria, important decisions to make. And this is not just for the coding agent, this is also for yourself. Here, to me at least, it helps me a lot if I write down a feature that I have in
mind. And while I'm writing, I'm already revising and think about how it could be different. So, writing things down helps make things clearer for yourself. And of course, you can still chat about this with your coding agent
it. So, what does it look like? Of course, it depends on the scope of the feature, but here's an example of what we did recently. So, I have this portal software design mastery program, and there's an API and everything. But what
we're currently still doing is that whenever a company signs up, I manually that they have supplied all the information, and then I send them an account a- ctivation email. And I'd like to automate that. So, in this new
feature, I'm describing here what needs to be done, and some things under the hood needed to change for that. In particular, we need to add a new status type to an account in order to support that, and then specify the email to be
sent, and photo of my pretty face. Now, this is not a huge feature, obviously, but it really helped me to write down the idea and reflect a bit on how we're going to implement it. For example, before I wrote this down, I didn't think
about that status change that we needed to add. So, I came up with it while I helpful. And of course, don't overdo it. You don't need to write a huge PRD if you just need to change a few lines of code. But overall, I find it's really
wrong, and that's what I showed in the beginning of the video, is that a coding agent changes unrelated things. We have the favicon example. A coding agent may not by default opt for the minimum number of required changes in
order to do what you tell them to do. It's going to optimize for their than adding the minimal number of lines of code in order to do it. So, in order to fix that, you need to supply some
constraints. So, don't just say improve the landing page, but specify it. Update the layout and the typography only. Change files directly related to this page, but also introduce constraints. Don't change branding, the favicon,
routing, dependencies, or add other features. Specifying constraints like that for the past months already, and I've noticed a big difference in the quality of the code that I get out of the agents. The fourth thing is that you
try to generate too much at once. Let's say you prompt an agent to build subscriptions, payments, account notifications, and reporting all in one prompt, and that's going to create a huge diff that you need to merge into
incredibly hard to review. You're going to forget like half of it and overlook a bunch of things. And especially in the beginning, if you have a relatively new app, it's going to lead to some architectural mistakes, and you're going
to pay the price for that later on. So, instead of doing this one big thing, break the work into small slices. Implement create subscription first, and then do add tests, include the behavior, think
about the domain logic, persistence, APIs, etc., etc. Once you're completely happy with that, tackle the next capability. And most importantly, when you take those small steps, verify that it does what you want. And that's also
why I'm not in favor of letting coding agents just work for days on end without any supervision. I believe you need to be involved. Is it slower? Probably, but
honestly, I'm more interested in quality than quantity, and I'm guessing your customers or your users are as well. And remember that you are still responsible responsibility and make sure that you deliver quality. It's like we're
learning software development processes all over again because this isn't anything new. Good development teams already work like this even before AI was a thing. The next one is making poor design decisions and unfortunately these
things compound. For example, let's say you have this generate report function and that depending on the format, CSV or JSON or PDF, it's going to do something else. Now, maybe you started this function as a very simple implementation
that just supported one or two formats, but as you can see even with these few formats, it's already getting pretty long. And if you now ask AI to add support for Excel, well, you may up with something that is even longer because it
may just add this extra else statement here. And that means that unfortunately, unless you solve the design issue that's at the root of this huge function, then worse over time. And that means you need to guide AI not just with writing code,
but also in improving the design. For example, you could give it some prescriptive guidance like separate the format selection from the generation or introduce some abstraction for report generator so new formats don't require
modifying the existing functions. You could also do more in exploratory way. I like to do that sometimes as well and ask a question, could we generalize this Compare protocol and mapping of functions keeping the conditional.
Explain the trade-offs. Do not modify the code yet. Doing this really helps you gain insight into what the best design is going to be for your particular application. And then as a result, you may end up with something
that's much better. So, here's another version of that code where we now have a callable type report generator and then I have separate functions for each of the types. So, for CSV, for JSON, for PDF, for Excel, and then I have a
dictionary that's a mapping from these types to the functions. And then I call that in my generate report function. So, now this is much nicer [clears throat] I can just add it here to the dictionary, introduce new function, I
can split this up into different modules. So, overall the design is much improved. And this is something where you play an important role because the agent doesn't know your design preferences or when an abstraction pays
context of where you're headed with the application. And I mentioned KISS in the also plays a role here. You want to keep things simple and that means you don't always want design patterns and a bunch of abstraction. It's not automatically
better. It's up to you to judge that. The sixth thing that you may encounter is that you get code that looks right, but actually fails. Agents can produce plausible code that completely miss edge cases or just fail
outright. And what I'm seeing is that some developers forget that we have tools for that like Pytest, Ruff, Pyright, endpoint checks, browser simulation, automation, etc. etc. All of these tools that are available to us to
provide guardrails that work really well. You can and you should use these with AI coding agents as well. Not everything has to be done by AI. Using tools like a linter or type checkers still very valuable. And when an agent
writes tests, you need to review them because passing a bunch of checks doesn't guarantee that the design is good or that the UX is what you want it to be. Also, I noticed that when AI writes tests, it may just write the test
for the cases it wrote the code for. It doesn't write it from the specification of what you want the behavior to be like. So, that's another thing that you need to be involved in. And finally, this is more of a software developer
mindset issue, which is that you shouldn't confuse completion with quality. We have a tendency to focus on getting things to work and I see it especially with lots of junior developers. You make
sure something work and then you throw it over the fence. But, the fact that something works, at At for production applications, is not enough, right? A working feature can still duplicate logic, add a bunch of unnecessary
dependencies, increase coupling, make maintenance a lot harder without failing any test. So, this is a quality aspect that you need to maintain. You can still use AI to also help you
there. Ask questions like, what complexity did we introduce in this change? What did we duplicate? Is there a simpler design? Which decisions should I review? You're using the agent as a code reviewer, but you
are the final authority. And especially in this step, you see how important it is that you know about software design fundamentals. Because if you don't know coupling are, or you don't know how to recognize them,
how can you ever guide AI to write quality software? That's a rhetorical Now, if you found this useful, like the video. Subscribe for more Python and software design content. There's also a hype button. We YouTubers have no idea
what it does. I suggest just click it, and then And if you want to dive in much deeper than these videos that I post on YouTube, check out my new software design mastery program. This teaches you
how to evaluate trade-offs, recognize design problems, design maintainable software. Skills that you need to direct AI agents and judge their output. Visit aron.codes/mastery. The link is also in the description.
I'd like to hear from you. What have you noticed when AI writes your code? Where do you struggle the most? Are there things you notice that I haven't covered Let me know in the comments. YouTube thinks you might like this video next.
Thanks for watching, and see you next time.
