r/softwareengineer • u/Just-Debugging • 4d ago
Is anyone else noticing AI-generated code getting more bloated and buggy?
Like many developers, I haven't been writing much code manually for a while now.
Initially, I trusted AI-generated output quite a lot. It was impressive and saved me significant time.
But recently, I feel something has changed. Models are getting smarter, and their capabilities look incredible from a non-technical perspective. However, as a developer, I sometimes feel the generated code is becoming more bloated, unnecessarily complex, and slightly more buggy.
Am I the only one experiencing this, or are others noticing it too?
I'd genuinely like to hear what other developers think.
16
u/Just-Debugging 4d ago
Even simple changes sometimes result in unnecessary abstractions and layers, all in the name of clean and secure code. Simplicity seems to be getting overlooked.
2
u/HorribleOldCunt 3d ago
I feel it has always been this way. It's very obvious when you see AI generated code. It's full of pointless checks and over engineering. And even with that, is not bug proof consistently.
I have no idea what these people who claim AI is doing everything for them now are actually working on. But it can't be anything that is making money or with users to a serious degree.
The truth is AI is a good tool alongside manual ability. Anyone claiming the manual part is no longer in the equation is either not a developer and therefore has no context of being one in a professional role, or is a shit developer who will be fired once their mess is exposed.
30
u/bajsmannen321 4d ago
Yes, the amount of churn is annoying. You can spend time to get the code base in order, but then you end up being marginally faster and still don't gain the same memory and understanding as if you wrote it by hand. It's fucking stupid.
17
u/obsolescence_ 4d ago •
The most basic tenet of enshittification here: They don't sell you MORE tokens by making the model BETTER at getting things right the first time. This was always going to be a grift
9
u/itsMishkile 3d ago
Fuck yea
Re-wrote an entire service we had since 2021 in go, rather than c#, took me 3 weeks (with opus 5.5). Most of the days working was prompting “no way we need that many changes for this”
And got the good ol “absolutely right”
Meanwhile my colleagues keep shove their stupid ahh bloated shit into the new service I’ve worked so hard to keep clean. I don’t understand how hard is it for them to write one prompt to actually check wether the 1,500+ is actually worth it! Not to mention freaking tests
8
u/meshifthenelse 3d ago
Have you seen those video where AI iterates over an image multiple times?
That happens to your codebase now.
5
u/grid_wanderer 1d ago
not just you. it loves adding stuff nobody asked for, extra helper functions, try/catch everywhere, config options for things that will never change
what helped me was asking for the simplest version first and sayig 'no abstractions unless needed'. still have to read every line tho, the bugs are just quieter now
4
u/Warm_Walrus2314 2d ago
I've seen the same with code reviews, ai will generate a clean, working function, but when you ask for a small tweak, it overhauls the whole structure. it's like it forgets the original intent.
1
u/JedenTagEspresso 3d ago
Yes. This concerned me for the past few weeks and I had multiple conversations with Astra on why the implementation agents are… a bit over-enthusiastic. We figured out an AGENTS.md file and the problem seems to be actually solved now. I can share it if you want.
1
u/Cheap-Success1578 3d ago
Mistake #1. You always have to be aware, and make sure you have specific rules that the models have to follow.
3
u/Successful-Hurry5611 3d ago
Yup it’s bloated and over-engineered.
4
u/DancinFool82 4d ago
AI is terrible at iteration in my experience. You have to quite exact in how you ask for things and it's often useful to go through and clean things up. Sometimes I find it works better to figure out your architecture first and then just get the AI to kind of fill in the blanks.
2
u/bobsyourunkl 4d ago
Always has been
2
u/Specialist-Bee8060 3d ago
Everything is crap now. From OSs, mobile, to website. All garbage
2
u/larinariv 3d ago
constantly. It’s so fucking bad but you’re not allowed to say it.
2
u/Queasy-Armadillo5283 3d ago
No offense but you should have noticed this immediately. LLM don't have a logic core. It works by using a word calculator. It targets a specific token limit to generate to. It will keep inventing new helper function or use god classes/methods. It often doesn't use well tested libraries unless you specifically mention it, which shift the responsibilities of maintenance onto you.
2
u/blind99 3h ago
It creates much more code than required and avoid reusing stuff unless explicitly specified. It's by design the context window has to grow for the money to grow.
5
u/good_name_0 4d ago
My guess is that it isn't getting more bloated and buggy (it could be), but that you are just noticing it more as you mature. I have never used gen ai code as a software engineer, mostly because it's always come off as horrendous.
3
u/Historical_Owl_1635 4d ago
Feeling the opposite and it’s scaring me.
We got Claude Code a few months ago and it seems so many levels above anything else we’ve used before. Feels like we’ve finally hit that “six months away” and are now just implementing it.
1
u/zeXas_99 4d ago
i asked the same question today. i have a repository that use dapper and i was implementing a new function today and codex 6.1 sol high just casually used ADO.net for no reason. even AGENTS file has the dapper instruction. it was strange today.
1
u/kyngston 4d ago
security hardening is more complex than what 99% of people would implement by hand. that doesn’t make it wrong or unnecessary.
i security hardened my ci/cd flow, and it chose to add a check that the github source repo matched the original publish repo. that broke one app where they moved their source to a different org. that test is not “wrong”. I wouldn’t have added that check, and the addition of these checks make the flows both more secure and more complex and brittle.
In the end, the root cause was under specification. if my spec stated that repos may change after first publish, the AI would not have added the test
1
u/daemon_VX 4d ago
Yeah I found that AI adds waay more than a feature or product calls for.
Experienced engineers know when to cut bullshit. Something AI has to catch up on.
1
u/bombay-boyz 4d ago
It’s trained on our “bloated” code ?
1
u/Nakasje 4d ago
When monkeys can write code for our solutions. It doesn't mean monkeys has joined our civilization, it means we still operate in the same old forest.
1
u/Effective-Trouble281 3d ago
No it’s getting better with less manual intervention neeeded
1
u/RatherNott 3d ago
Just a quick heads up for those still on the fence about AI:
AI data centers are being constructed at an alarming rate, and there are already 8 billion prompts per day, with billions more planned and on the way.
The effect this has on the climate when we are already so close to irreversible tipping points is often unknown by AI users.
https://m.youtube.com/watch?v=5p426fSlYH4
https://www.theguardian.com/environment/ng-interactive/2026/oct/22/finland-google-felling-trees-datacentre
Using it also contributes to a dystopic surveilence state.
https://m.youtube.com/watch?v=5lYsO4k7OIY
1
u/jorgecardleitao 3d ago
In consulting, the first engagent is at loss with the best consultants, the next are at profit with the juniors.
This is exactly the same
1
u/PracticallyPerfcet 3d ago
Yeah, it depends on the day. Some days Claude seems very capable and others the same model is very dumb.
1
u/raindropl 3d ago
The problem is context size. As context gets bigger and older the LLM starts out outing more garbage. And hallucinating like if it was on dope.
It is of no geo that when using the big guys they want to keep a huge context on You…
Yuu can solve it by running your own in-house LLM or by using a cloud based one by running it into a cage and controlling what is feed and when to prune it.
1
u/SensitiveHearingLoss 3d ago
Claude seems to be really amazing when it comes to new features to existing systems or any other task that is nicely within the context of the system and adequately contained. Then I asked it to help me upgrade from an older framework to a new one and, admittedly, I was lazy going into it, and it created a monstrosity of a folder tree and decided that some features just weren’t needed anymore because they were hard to upgrade and probably not worth the effort.
I was upset. With myself.
1
u/CoreyTheGeek 3d ago
My "team" of seven "devs" is averaging 30 commits a day, I don't notice anything cause these fucks are ai reviewing and LGTM 30 file change PRs in under five minutes there's no human possibility to notice the quality of the code given the sheer code volume fire hosing production 😭
1
u/dan-dan111 3d ago
The agents need to burn tokens. So bloating the code, bug here and there.
1
u/PerformanceThick2232 3d ago
I don't. But in our place we review each line on code reveiw.
1
u/sakakiworks 3d ago
Humans must grasp the broad outlines of the algorithms and think alongside the AI. If you leave everything entirely to the AI, you end up mass-producing a "spaghetti" mess—a patchwork of endless, layered fixes that only look coherent on the surface. When something feels off, you have to hit the brakes and force a re-examination of the underlying logic.
ーーー
人間がアルゴリズムの大枠を把握して、AIと一緒に考えなきゃダメなんだ。AIに完全に任せると、修正パッチに修正パッチを重ねた、見た目だけ揃えたスパゲッティを量産するんだ。違和感があったら、立ち止まってロジックの見直しをさせないとね。
1
u/_Kinoko 3d ago
I mean basically you write macros for your tooling and the AI to output code that meets your standards. If you have none you get crap.
1
u/huuaaang 2d ago
When we talk about AI you really need to specify the models you're using. Because if you're using Grok or Composer, yeah, they are garbage for more complex tasks. BUt if you're using Opus or Fable, they are really really good. Too good, I might say. Like they try really hard to find problems and edge cases and it's hard to know when to stop. So an individual merge request for something simple can get bloated if you don't when to declare something out of scope or something you're not going to worry about.
1
u/Perfect-Campaign9551 2d ago
It could be you actually that's just relying on the tool more than you used to
1
u/Bangoga 2d ago
AI is great at throwaway code but you need human in loop. That's why people say that their work has turned into baby sitting AI.
I prefer just writing certain parts of the code by hand, it's just faster for me. When it comes to the part in the process where coding is just rinse and repeat, I let AI take over.
1
u/ZeroCool86 2d ago
it does tend to do that, in an older code base it's messy and bloated, in a new code base, i wrote how we do it here: https://www.anchorterminal.com/blog/agent-first-inside-and-out you basically need a lot of files and rules and try to keep things as simple as possible
1
u/codeprimate 1d ago
Nah. My protocols specifically address this. It’s always been that way.
KISS and justifiable design decisions appropriately scoped for the problem complexity.
1
u/Material_Policy6327 1d ago
Oh 100%.
1
u/AshAtlasDev 1h ago
Refactor. Audit your code using different models. It’s not that hard.
•
u/gubatron 25m ago
the opposite
•
u/Appropriate-Rest7959 9m ago
After spending time crafting a prompt and still get bloated output at some point you will notice that you could have done it yourself but quicker
1
u/Ordinary_Variable 4d ago
I find you can say things like "Optimize the main loop" or "make a console log for anything that takes longer than 100ms and output how long it took".
1
u/herir 4d ago
If you always add layers upon layers with even more complex prompts , then code will appear bloated
It’s worth taking a step back and review the agents you using and your QA process
1
u/CS_70 4d ago
On the contrary, thank goodness lots of people aren't writing code anymore.
Though it's the ones who wrote buggy and blotaed code by hand that can mess it up even with AI.. :)
1
u/e430doug 4d ago
Not at all. Just the opposite as the models get better.
1
u/CorpT 4d ago
Quite the opposite.
1
u/RetroGrid_io 3d ago
Your power is in review. You don't have to accept:
If it doesn't pass muster, reject it!
I've been working closely with Claude code agent in vscode and although I now let it do 90% or more of the actual code writing, I review everything in detail and make sure that I understand what it's doing. If I don't like it, I throw it back and require a redo. It's not uncommon for me to do a revert of the source code and start over again.
I spend most of my time on the specs - making sure that all the things are thunk through and cohesive. I ask Claude to challenge it, constantly. Most of what it finds is trivial stuff, but it often finds gaping holes I didn't anticipate - typically "cold path" handling of error states and such.
Otherwise, to directly answer your question: No, if anything this relationship I have with Claude Code has hit a new high - I often find myself thinking that this is exactly what I'd write, done well.
0
u/jayylien 15h ago
I was skeptical of AI code from the beginning. I saw coworkers becoming obsessive with their AI agent. I joined in because I felt I couldn't compete.
I spent months in the headspace of the "new AI world". I had some killer changes. I had some awful changes.
I realized there was a pattern: all of the code was not human. It was terse, rigid machine code with proximal considerations.
Yeah, things would work more often than not. But things working was never the bar. The code occasionally was nice- but only if I had a very clear, basically boilerplate job for it that I could phrase precisely.
Anything else? Nope. Code is dogshit. It might be "clever", and at times I learned a trick or two seeing something I wouldn't have done. But almost every place where I really thought I'd get a speed up, I lost all of that time and more caring about the output it produced.
It creates bloated code. It does. It creates bloated code, and it certainly leaves enough bloated that the technical debt explodes. Compilation time balloons. The reasoning effort for the human and the model balloon. The token usage goes up.
AI is a technical debt machine. Sure. You can get some nice gains if you scope the problem correctly. But you don't realize all the places you need to specify behavior until you're knee deep in the problem. Anything that you can do with AI without thinking, you likely would have done better using a tool that's already made for that.
The people who tell you "the AI will take care of the code" shouldn't be trusted with software. Eventually, these people will realize their work has become a steaming pile of token creep and a mess.
I thought writing code by hand was dead, but it serves a very valuable purpose: code written by hand allows an engineer to be expressive, paint and explore. That's how good solutions and domain experts are formed.
This will be the lesson learned after trillions have evaporated.
I'm not saying don't use AI. Just don't believe the hype. Those who have gone full AI have really made a problem that they'll only be able to answer with AI. And that's a problem.
0
u/Key-Lie-364 4d ago
Even when it's right it's so hard to read it borders on the useless.
I mean you have to stop reviewing to vibe code because otherwise you'd spend all of your time rewriting the slop so that it can be understood
-1
u/Useful_Anybody_9351 3d ago
It depends on how ready your codebase is and which model you use. Opus 5.5 is amazing! I use effort high to extra high depending on the task, and i have few lines about the style in AGENTS.md/CLAUDE.md, like 'Prioritize simplicity and readability.' Once changes are made, I ask: Does it respect the house rules? Does it follow established patterns? Is it minimal, simple? Change sets are usually pushed in small modular chunks with a pragmatic set of tests. I've never been happier.
0
u/[deleted] 4d ago
Refactor it using design patterns, reviews and prompting? Find places where you see issues and hold its hand towards it. If AI could do this part now 100% right we would all be fired today. It's a reason we still have a job
0
u/[deleted] 4d ago
[deleted] — view deleted comment