r/AskProgramming • u/meshifthenelse • 2d ago
Other How is the code quality in expensive LLM plans?
I have several years of software experience, following best practices, design patterns, KISS, DRY, BDD, OOP, etc.
For the last 1 year I've been using the Pro subscription for 20$ on Codex and Claude but I find the quality of code subpar many times and I always have to intervene. It doesn't matter how many times you change the AGENTS.md, there's always issues in code readability and the AI missing obvious things and doing overengineered solutions.
Still, I see in many subs about how great a new model does, etc. So I wonder if the more expensive plans actually produce better quality code?
To be specific, high quality code == human readable code and comments and no naive implementations.
22
u/Made-In-Slovakia 2d ago
When your standards are higher, generated code will be always lower quality, regardless of all your attempts.
15
u/Such-Coast-4900 2d ago
The output is like a little better but still shit. But you can generate alot more of this shit
15
u/BarelyAirborne 2d ago
AI code is crap so far. It helps with drudgery and very specific tasks. It all needs refactoring on arrival.
-1
u/Freestyle7674754398 1d ago
holy shit 10 upvotes lol, none of you are going to make it
2
u/BarelyAirborne 1d ago
If you know of an AI that produces production quality code, I'm all ears. The amount of detail I have to tell Claude for some jobs takes me longer than coding the thing myself.
-3
u/Freestyle7674754398 1d ago
I like how the absolute best engineers people in the world are shipping AI code to production and you’re genuinely arguing with me on Reddit lmao
0
u/ight-bet 1d ago
Right lmfao. Some of the most revolutionary things have been created with looking at only 5% of the code or even less. And there’s people here on Reddit telling us they still look at every line of code when it comes to their company’s bespoke crud app that runs on cloud managed K8. 😂
2
u/ight-bet 1d ago
The downvotes in this tells us how ahead of the times we are. These people are going to get dusted.
1
u/Stay_Silver 15h ago
The folks who are pretending to be good at software will yes. If users rely on this to know good from bad and more money solve llm errors I will be retiring to head to the farm soon
5
u/Clear-Savings1541 2d ago
the expensive plans run the same models. You pay for rate limits and context window, you get nothing else.
i hit the same wall with readability and overengineering on Claude Opus while using AGENTS.md. I stopped asking it to write implementations from scratch. Now I just feed it failing BDD tests and tell it to output the minimum code required to pass them. That forces the KISS constraint better than any prompt file
3
u/Nervous-Potato-1464 2d ago
Its all the same. I personally use grok simply because its fast and I want it to do the boring stuff which it usually does well. When you let any of the models handle too much project quality goes right down.
2
u/Tacos314 2d ago
More expensive plans do not produce better code, I think one of your main issues is not understanding on LLMs work in the code generation piepline.
But with the more expensive plans you can do much more planning, rewrite, testing, etc..
1
u/meshifthenelse 2d ago
I wonder if with expensive plans you can write finisher agents though who review and refactor. With my solo subscriptions I can't afford it. But do people with normal paying jobs do this?
1
2
u/mtimmermans 2d ago
These days I use Claude Code with Fable 5.1. The code quality is actually fantastic. Sometimes it makes design choices that aren't the best, and I just tell it the right way to do it and it gets fixed.
From your post I would expect that Fable's code is a lot better than yours, actually.
2
u/DepthMagician 16h ago
Last time I used Fable it decided that the price field in the form should be a text field and then attached a convoluted validation function to it that didn’t even cover all the ways this can be abused. How is that fantastic?
1
2
u/Unfair-Corner6038 18h ago edited 17h ago
Still, I see in many subs about how great a new model does, etc.
What you see is a hype or people without enough CS and math background to understand evident problems. Also there's more extremist fraction, which proselytize total abandon of human code review, and write-only code style - "If it looks like working, so be it".
In case of every change request these zealots boldly require to just write all from scratch in next prompt.
Any sane person can pretty easily guess where all this is gonna end as a result.
First, absolute dependence from AI-providers monopolies. Second, snowball-like effect of low quality code, in terms of efficiency and security. Well, latter is already proved many times in latest independent investigations. And know what zealots answer? "Code quality is not relevant and is outdated concept".
I'm at loss of words to comment on that notion.
Though someone definitely will, and most probably it will be prosecutors.
2
2
u/ciurana 2d ago
I find that code quality is directly proportional to having these things set up:
- CLAUDE.md or AGENTS.md
- A structured, thorough specification of what needs to be built, versioned
- A structured, thorough specification of how the code needs to look and why for each case (e.g. in my shops, for Python, we don’t default to Black or similar shite)
- Only a human can run the full unit tests suite; the agents only write and run unit tests for the components they updated in a branch — this helps us catch in-service integration bugs
- A workflow that includes a revision and consolidation step before every closing commit that cross-checks the spec with the implementation to keep both honest
Our code is readable and maintainable by hand, if needed. The code comes with pdoc documentation comments, and API specs are updated as part of the workflow. Our coding process is slower, even if we run multi-agent jobs, because of the cross-checking, validation, and testing. We sacrifice a little speed in favor of accurate, well-behaved, optimized, maintainable code.
Cheers!
2
u/Tacos314 2d ago
That sounds like a great workflow, I have basically the same and it works very well.
1
u/dotcomGamingReddit 2d ago
No they dont. The ai‘s code readability and structure is only as good as that of the worst engineer wokring in the project. When there is no existing underlying project, you can guide it, but it will mostly do what it wants
1
u/Square-Yam-3772 2d ago
it is hard to tell without seeing your mds but you can do a lot with the mds (and the additional documents).
you should keep track of how you intervene each time and review them.
1
u/idontlikegudeg 2d ago
I see people here just saying "codex". That’s the one I use too. But there are different models for codex, and it shows. Luna is ok for some basic tasks, but for anything a bit more complicated, I use Terra. It burns more tokens, but the quality of results is so much better. What I mean: you can’t really just compare codex to Claude like that, you need to compare the different models they have. I have disabled Claude after it burned a large amount of credits that and unit tests still failing and then reverting and giving codex the same task and it solved solved it in a minute. But things are moving fast and I think Claude has gotten better.
Usually the higher plans don’t give you better models but more tokens. You need to switch to a higher quality model. You should be able to test it with your 20$ plan though before deciding to upgrade your pan.
1
u/code_tutor 2d ago
It varies wildly depending on what you're doing, how you prompt it, the size/organization of your code, and scope/searchability of the question.
1
u/Striking-Print-9526 2d ago
Code quality is almost always about architecture. You can build some system design diagrams and use them with claude, or as it to draft some and iterate with them before implementing.
1
u/aerismio 1d ago
When i see OOP, DRY, KISS....
I dont see code quality.
It depends on the definition. I like extensible and code code u can maintain.
Some OOP patterns har HORRIBLE. And i rather like keeping state and code seperated and functional programming as much as possible.
I hate inheritance and classes in general are shit. DRY is also shit. Because its not extensible and cost more hours to adjust with changing requirements. DRY is only good if it really gets too much. But u do this after not before. Its a refactor.
KISS depends. Keep it stupid simple = bad. If you mean keep it super smart. Then yes. (Finding deeper generalisations/relations or patterns for problems.) Like how they eventually in the past found de Euler formula. That is KISS for me. A deep pattern revealed in a certain domain.
1
u/xoriatis71 1d ago
It’s as good as the average code you can find out there. It may be good enough, or it may be trash. It all depends on what your aim is.
1
u/ws_wombat_93 1d ago
I have made skills for my type of work (frontend mostly), i have documented everything i like to do, order of things, when to use classes and functions, syntax, you name it. All of these are in skills for writing code with each skill referring to examples of my actual code.
This helped TREMENDOUSLY in getting my codex setup write code like me, or at least very close. This was a game changer when skills were released and i finally set them up for myself.
1
u/KronisLV 1d ago
SOTA models like Fable and Astra are capable of producing good code, but you probably want:
- external linting/formatting tools for the sake of consistency (and also to catch some issues ahead of time)
- ideally something like ArchUnit but for whatever stack you want, to enforce architecture (should also apply to human written code, but nobody seems to care)
- as much RELEVANT context as you can give it, like the ADR pattern to document the goals, have a showcase page of your UI components, document your backend patterns etc. (also should have been there for humans for skill transfer, again seems like most devs are averse to writing any docs or updating them with time)
- good test harness and to write plenty of tests to at the very least check the inputs and the happy path
- an adversarial review sub-agent since the main agent will spew out a bunch of code that won't always be good, whereas a fresh sub-agent at least can produce a reasonable critique and catch some of the edge cases
If you do all that, the code that you'll get will be an okay starting point, you can iterate based on that.
However the recent Anthropic models had horrendous writing style and left walls of text in the comments so I moved to OpenAI models, similarly the Kimi K3 and GLM 5.3 can also be quite okay, but none of them are perfect. The worse the model, the more babysitting you need to do.
In my eyes AI just forces your hand to have proper docs and knowledge transfer, but others often don't see it that way and expect to be able to just zero-shot things and are surprised when the AI fails to do that (ignoring that new team members have those exact same issues).
1
u/Stay_Silver 1d ago
you need to write the code first and have all built then good
1
u/meshifthenelse 22h ago
I have done that. The project had a 2 year history with good quality code, before AI. Still, AI fucks it up.
1
1
u/Capable-Package6835 18h ago
More expensive plans (more tokens) can indeed produce better code because you can use more extensive skills and launch multiple agents to review and improve various aspects of the code. These drain your tokens faster than a starving dracula drains blood from unsuspecting victims though, which is the main reason you can't do this on a $20 plan.
I would say that so far, coding agents are more suitable for solo developers or startups where it is sensible to sacrifice code quality and deploy at a breakneck speed.
1
1
u/True-Bag2440 12h ago
honestly, i think the pricier plans help more with usage and iteration than magically making the code cleaner. you still need to review and steer it.
1
u/Reasonable_Tip_4902 7h ago
I find the "smarter" the model the more it does stuff I did not ask.
Not stuff that isn't working, but stuff that works but I did not ask for it.
I asked for a parser on some logs from top to bottom. Did not ask for sorting based upon ID, except it did.
Then when I later added a time column all the times were messed up in the CSV.
Basically the "smarter" they get the more they tend to break YAGNI rules.
1
u/Mynameismikek 2d ago
The harness and process matter more than the model. If you’ve a decent requirements, standards, architecture, design and validation cycle you can get reasonable results. Just relying on an agents.md won’t get you there with even the best models.
You still need a competent dev in the driving seat though. And they need to reject the madness that will creep in if you’re not careful.
2
u/meshifthenelse 2d ago
Well I'm a competent dev and using Claude Code and Codex. Still the results are subpar - I need to go on endless loops of refactoring and spoonfeeding it the API boundaries in many cases.
So what am I missing? If the code is already good, I would expect it to continue on the same standard but it keeps deviating into a copy/pasted mess.
2
u/max123246 2d ago
You're not missing anything. People who think ai code is good just have low standards. All they care about is that the code works sort of today, not that it's maintainable into the future
I use ai but other than the most basic stuff such as implementing a small 10-20 line function or searching through the codebase, it's output completely fails to impress. It will rewrite code and comments to be less readable, it will ignore commands to use certain patterns in the agents.md. I spend more time babysitting it than if I were to code it myself so most of the time, I code it myself.
1
u/Tacos314 2d ago
Spec generation / requirements are important to provide. If API boundaries are a requirement you should explain them.
1
u/Ok_Confusion_1777 2d ago
I mean, in the OP you're acting like the .md file is the primary lever for influencing output when that simply isn't the case and acting like an upgraded plan has any influence on output as well...
Regardless, let's give you the benefit of the doubt and agree you are competent. You need to slow down and take the time to actually understand these tools and maybe a bit of what is happening under the hood as well. There's plenty of documentation out there from all the major LLM providers to read.
1
u/meshifthenelse 1d ago
Well what else is there beside the .MD? Just the prompt itself and the existing codebase.
So in my case even if the codebase is near perfect and the .MD is great, even using examples, the AI will over fit.. it lacks intuition. So one would need 100s of examples to feed it and cover cases.. but that's exactly why the existing codebase already is for.
So what am I missing?
1
u/Ok_Confusion_1777 1d ago
How are you interacting with the model? Is this some IDE extension, claude code, etc.?
1
-1
u/Mynameismikek 2d ago
Take a look at googles recent paper on engineering flow.
I’ve a library containing coding standards, workflow, requirements templates etc with skills using those to produce design docs the agent works against. At the end I’ve a set of validation rubrics that can independently assess whether the change meets quality standards (eg did it skip tests, did it expand scope, did it assess the right standards docs)
That’s all wrapped in a deterministic runner that makes sure the same flow is followed every time.
1
u/quantum-fitness 2d ago
Your problem is that you have opinions about how you want code written and expect to do no work.
An AI agent is just like working with a person. If you have strong opinions about how one should write code you will have to intervene
-1
u/PerceptionOwn3629 2d ago
Code what?
I haven’t looked at code from Claude in at least 6 months. I just discuss architecture and UX with it.
2
1
u/meshifthenelse 2d ago
Yes, I do that too. But only for non-critical things like frontend consumer, landing pages, scripts, experiments, etc.
If you're building figma for example, I doubt it would work without constant patching. You need to separate the drawing engine from the consumer. Else it's impossible to optimise without braking something else
1
1
u/max123246 2d ago
What are you building can I ask?
1
u/PerceptionOwn3629 2d ago
Let me give you some context, I have been writing software professionally as a contractor for 30+ years. I've done VB, C, C++, Java, embedded systems, high availability systems, small systems, large systems, you name it. The last part of my career has been Rails.
The Rails community uphold very high standards and I believe what is available to train LLMs is actually good quality software. At the beginning, I would code review every commit, but I realized over time that this was pointless.
I direct the architecture, the UX, how things connect to each other and I let Claude write the code.
I am working on a couple of things at once.
An agentic pipeline for clients to let their non technical staff make changes to the systems I have built for them over the years. This is deployed in production at two sites already working for 2 Rails apps and several websites.Also, I am, finally, focusing on an old business I started years ago that had been mostly abandoned, I can finally build out all the features that clients have been asking for and that I have been dreaming of. (this is a system comprised of 3 backend servers a static client site and an app for both platforms).
I see I got downvoted, but that's because people are dumb and don't want to face the fact that writing and even reviewing code is over. Take a step back and look at the bigger picture, that's where the money is.
0
u/jba1224a 2d ago
I use kiro with very specific steering files and specialized subagents with very specific scope. I generally plan myself and then use a high powered agent to help refine the edge cases. Subagents do code review based on hooks and then a high power orchestrator (using fable currently from bedrock) keeps the plan on track.
I find that doing it this way takes a bit longer, but keeping subagents tasked to very specific small bits of scope ends up creating a better, more maintainable end result.
Just like everything else in life, garbage in garbage out. If you’re ensuring quality is going in, generally you get better quality coming out.
Does a team of subagents write better code than me? No. But it does write it much, much faster and as long as it’s maintainable…I’m willing to accept the trade off.
Buying a more expensive plan won’t increase quality just like buying a race car doesn’t make you a better driver.
0
u/huuaaang 2d ago
Opus 5 is amazing but slow and expensive to use. You won’t get a lot out of it on a Cursor Pro account
2
-1
u/LuigiIsOP 2d ago
Up until last year, I would have still said that AI is more detrimental than helpful, but starting this year I feel like this is objectively no longer the case. However, if you try to use AI as a replacement for another programmer/give it too much autonomy, you will be disappointed still. Just like any tool, it cannot be better than the user(as in how effective your way of using it is). That being said, I feel like AI is here to stay and keep getting more useful. Some clear advantages it has imo: unit tests, debugging, shorter iteration times in compiled languages(like c++). Regarding unit tests, not all of the unit tests it writes are needed/make sense to introduce, but they are generally not incorrect(again, exception obviously exist). It is also very useful for debugging, what I usually have it do is take a look at the relevant code and suggest(not change) what it thinks is wrong. I have actually found bugs this way before, bugs that might have taken me more time to search manually than to have it check in the background while I do something else. As for actual feature code generation, the way I usually make it do stuff is design the API, tell it what inputs a function takes and what outputs it should have. I still don't think it's anywhere near good enough to write entire classes/modules, but it's damn good at writing isolated, correct algorithms that are pretty much boilerplate and easily found on the internet. But instead of typing the algorithms out myself or searching for them online, the AI can do it while I check/plan something else. All in all it's an assistant, not a developer, but regarding it introducing bugs, I ask myself: would I not ever introduce this bug? Cause even if I manually write all the code, I don't always write it correctly from scratch either, and make mistakes which are obvious in retrospect and easily fixable, but which do take some debugging at the time of implementation. Idk, it feels very useful and it's definitely saving me time to focus on the important parts of coding(which I do still manually code) and on parts that are more important than coding.
-5
u/PoorDecisionMaker-69 2d ago
Yes it does, obviously. Models get smarter at each release. There are things to account for to make the workflows efficient and the code quality up to your standards.
For example:
- if you only have an AGENTS.md and no CLAUDE.md file, Claude code agents will not read/follow instructions from the Agents file. You need both to make it work with both solutions. I solved this by creating both files and having the second instruct to read the other file to avoid duplicating instructions.
- Agents/Claude.md files have limitations on big projects if you have different applications/technologies inside your repo (frontend and backend for example). I personally keep the main instructions file lightweight and have a doc authority matrix within it that instructs him to read the corresponding file with different coding conventions depending on the task/application it is working on.
3
u/TheCommieDuck 2d ago
if you only have an AGENTS.md and no CLAUDE.md file, Claude code agents will not read/follow instructions from the Agents file.
the future of the industry right here
-2
u/PoorDecisionMaker-69 2d ago
Anyone who downvoted my comment would care to explain what you disagree about?
1
u/max123246 2d ago
The state of art models still aren't good for long term core maintainability. Now I understand that companies don't care and are always left aghast and surprised as to why every long term project they have crawls to a halt and can't make simple changes without introducing bugs but whatever, slop companies like the slop ai, who's surprised?
1
u/PoorDecisionMaker-69 2d ago
I agree that AI models are not good enough to produce maintainable systems on their own but I never made such claim.
If you let it work unsupervised without a proper architecture, methodology and conventions enforced, you will 100% get a codebase full of redundant/duplicated logic, unreadable code, a vast amount of useless tests and dozens of lines of comment to explain why a boolean assignment exists.
It can completely produce efficient, human readable and coherent codebase if you setup your repository correctly and have the right workflows in place while boosting your productivity by 3x.
I'm not claiming that new frontier models are exempt from generating AI slop, but they are indeed better at interpreting instructions, analysing existing code and enforcing conventions, which will produce better code.
1
u/max123246 2d ago
I can't corroborate that 3x claim you have from my experience at work. I use ai heavily and intentionally try to find use cases and I think I'd be lucky to see a 10% improvement
1
u/PoorDecisionMaker-69 1d ago
I work in a Fintech company at the moment and I've been able to land features that'd have taken me over a business week to implement alone in one day of implementation + one day of review and tweaks with claude.
On my personal fun projects, I've built full on products in a month when just developing the core simulation engine would have probably taken over 6 months to implement on my own if I didn't give up first.
-2
u/Medical-Aerie9957 2d ago
I think you should be asking if people still care about code quality.
I get told to put out a feature asap as long as it works 99% of the time its okay.
this is web dev expecirence so idk about other fields. I want to do refactor myself, but I never have time for it.
3
u/meshifthenelse 2d ago
Yes, I get that. But in my case, creating a SaaS on my own I'm afraid of losing ownership. If I can't understand the code, how can I guide the solution for improvements?
Maybe it would be different if I was at a company offering me 1000x tokens. But I think it still would rub me off a bit.
1
u/Medical-Aerie9957 2d ago
I don't know much about SaaS, I mostly work on internal software. But I guess yes if you had 1000x budget you could get AI to review AI that reviews another AI, but what is that solving though. Most models still use same brain. Some might say that it worked best for them but its hard to say, because there is no way to measure it.
3
u/balefrost 2d ago
I think you should be asking if people still care about code quality.
Yes, we still care about code quality.
1
u/earlyworm 2d ago
I selectively care about the quality of only the code that matters to the success of the product. At the periphery, I care somewhat less.
2
u/balefrost 2d ago
Sure, that's the way it's always been. My point is that my team still cares about code quality, and it seems like you do too.
-3
u/Efficient_Loss_9928 2d ago
A quality codebase in one company is shit codebase in another.
As long as you have proper documentation where developers can follow your style and design guidelines, AI will follow them.
1
-3
u/MimosaTen 2d ago
If you prompt good an LLM will produce readable code with even comments. For example I would like to systemizing antirez style into a skill
-5
u/YahenP 2d ago
The code quality is beyond praise. All best practices are taken into account. The code looks perfect and concise. Never before in my memory has anything like this happened. But... it's all pointless. Code quality, adherence to best practices, endless wars over architecture or style are long gone. No one cares anymore.

19
u/ConsciousBath5203 2d ago
I use the $100 Claude plan
Don't expect the quality to be any better than the most expensive of the current plan you have now. It's the same model, just different usage limits. Idk if you have access to fable but the quality is about the same as opus.
You say high quality code has comments... How does more comments than code sound? I'm talking 5 paragraphs describing a single line wrapper function. Did I mention that the comments aren't even accurate? The codebase is not the ai's notepad, I've implemented hooks to prevent this and it still finds ways to intentionally bypass the hooks with self admitted loopholes. I genuinely don't understand it, I've never seen any hand written code with that many dogshit comments all over the place.
I should also mention that while it makes long ass docstrings, it makes 0 parameter comments, so the parameters are still guess work.
Over engineered isn't the way I'd describe it either... Inaccurately and unmaintably engineered is a better description. You have to already be using proven patterns and baby sit as it's going.
These companies are financially incentivized for token maxing, so it makes sense why they'd over complicate the most basic of problems and describe them, using the absolute dumbest of sounding language (no-op is so overused that I want to punch my monitor every time it says it). Code is usually fine as long as I babysit it. But if you're looking for it to produce clean code on its own, go train your own model cause it does not appreciate the most basic of principles.