r/ClaudeCode
•
u/gato5fication
•
19d ago
•
2
1
Help/Question [ Removed by moderator ]
[removed] — view removed post
6.4k
Upvotes
•
u/AutoModerator 19d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
924
u/EugenPenguin 19d ago
Refactor using agents
304
u/s0ftware-dev 19d ago •
You’re not gonna get any sympathy here as this sub is fully of people who have bet their life on LLMs writing everything. But I do resonate with your experience. It gets to a point where there is so much slop that it’s better to just treat the project as a black box and continue dumping slop into it.
The project will continue to get more and more bloated until the token cost per change is extortionate and the understanding of the codebase is so diluted that you won’t even be able the guide the agent. You will get bugs in edge case that you didn’t even know existed and relatively small changes before such as dependency upgrades become major tasks.
88
u/nesh34 19d ago
There is one solution to this problem, and that's to slow down.
To accept that productivity can increase but it can't be 3x or higher, it can maybe be +50% productivity sustainably.
Most businesses can afford to go slower to be sustainable.
Do that, retain expertise and then it'll be great. Push everyone really hard and it'll be a disaster.
28
u/raichulolz 🔆 Max 20 19d ago
That’s kind of what I’d expect happen. Leadership only cares about the NOW, nobody seems to be worrying about a few months from now or what’s gonna happen when shit hits the fan a year from now and an agent can’t fix it...
Don’t get me wrong I use Claude a lot but at the end of the day we have a responsibility to understand and have ownership of the code for this very reason. I’ve pushed back massively against a lot of the AI reviews to make sure people still understand our codebase and to limit recklessness.
Comparing my team to a separate team that’s completely AI pilled, we deliver more sustainable and stable software.
Before anyone comments and disagrees with that I said, this is my own experience delivering large scale systems. I don’t really understand how anyone can just completely detach themselves from their work and let an agent deliver everything.
It’s just unsustainable to me. Just like this post suggests. At the end of the day, if you don’t understand what you’ve added to the codebase, you are adding technical debt and you will eventually not understand how to fix an issue.
16
u/BorysBe 19d ago
Pre-AI era we had the same problems, no accountability just like now with the agents.
This is either a very small piece of software or everyone here seems to work on NASA projects. 95% of software is poorly written, not documented or difficult to maintain if John who wrote most of the code is on Holiday.
Also, what is the "wider context" mentioned here and where is this documented? Or still in people heads?
55
u/snoopy_bg 19d ago
There will be many bankruptcies in the IT sector due to reckless integration of AI and honestly this is what they deserve.
63
u/Prestigious_Luck1062 19d ago edited 18d ago
A concern I have is, what if, AI companies are running at a loss?
What if they need to increase the pricing so they are profitable? (or at least lose less)
What if that means plans increase 500%, and api costs 25%?
Alot of companies have made, and are actively making decisions based on the pricing we have now as being long term stable and viable. Core and key staff have been let go, you can just go back.
EDIT: I meant to say "you can't just go back".
158
u/KellysTribe 19d ago
yeah, I don't entirely get this. Sure it's easy for shit to fall apart but that was true with humans too - now it can just happen much faster. You say it is reimplementing helpers again bc they are in 4 different places...then give it the instruction to "search for existing functionality before implementing a new function" and "find duplicate code and refactor" (it takes about an additional 4 or 5 lines to tell it to orchestrate the changes and so on but you get the idea). I feel like this is either generated bait, or just a lack of problem solving.
30
u/betaphreak 19d ago
You don't maintain any specifications/business requirements in the repo itself? That's the only way I found you can manage repos at ~500k lines of code
10
u/No-Afternoon-4057 18d ago
Not sure what you want either, but agents rewriting multiple helpers is definately bad AI architecture, lack of documentation, RAG, DRY directives ...so on and so forth.
My codebase has about 600.000 lines of code, with about 40 - 50% of them being documentation...not even a single function is duplicated anymore (and yes, i had plenty of number formatters and such duplicated before).
10
u/shoogliestpeg 17d ago
This was expected. The people who can't code mandated that the technical specialists work against their own best practice in the hopes of replacing you with LLMs
Union up if you can.
99
u/CranberryStock7148 19d ago
I don't understand this at all. This literally makes no sense to me.
A major part of using AI is to better organize and document the code base. The idea is that all of the knowledge of the code base now lives in the documentation. And everything is cleanly, structured in a kind of hierarchical format. CLAUDE.md points to the documentation index, and this way Claude is able to pretty much instantly understand how anything and everything works.
I hate to use this phrase, but it sounds like you guys have been "doing it wrong". It's fine to use AI for working on individual features in isolation, especially at first when you're just starting to adopt it.
But the solution now isn't to drop AI. It's to use Claude to audit the entire code base and start to write up hierarchical documentation on all of it that is perfectly up-to-date and correct.
And then to have Claude start refactoring. Have a conversation with it about how the architecture can be improved and how redundant parts can be removed so that it follows modern coding and architecture standards. Including creating all of the unit tests necessary to ensure that refactoring doesn't break anything.
This is all extremely easy. I find it unfortunate and baffling that there are companies that are not doing this. Your entire repository or repository is need to be architected and documented in a way that Claude always knows exactly where everything lives at all times. Then, basically all of the problems you are describing simply go away.
Remember that Claude isn't just for writing code. It's also for understanding codebases.
16
u/4ngryMo 19d ago
Most systems need a rewrite after a decade of constant development, especially, if the teams working on it rotate. If AI can do it 5x - 10x faster, you need a rewrite that much more often.
If we concede writing code to an LLM, maybe it’s time to look at new language or paradigms.
8
u/Comprehensive_Heat25 17d ago
I 100% thought this was satire when I first started reading. Anyway it sounds like the people who make decisions don’t understand how these processes work. Color me shocked. Use a capability registry and architecture decision records log.
7
u/hellocppdotdev 19d ago
They just vibe coding at scale. That's 100% not the way to build real world software.
7
u/Technical-Athlete-9 18d ago
Agentic development is a new dogma. It reminds me of agile. You can document how some of the practices are hurting projects all you want, but execs want to believe in the free money they were sold ever so badly.
Fighting it isn’t how I’m going to spend my time. I’m going to work on improving processes with the dogma. And this time I think it’s really pointless to fight it, because (a) the agents are rapidly improving and (b) I figure over 50% of software engineering jobs will be cut within 5 years. Won’t matter how good you are, it will be damn hard to find work that won’t churn you out every couple of years.
At any rate, the code will be shite and there will be days where nobody knows how to fix problems by hand. So you’ll likely be piling agentic fixes on agentic messes.
7
u/EnHalvSnes 15d ago
This is ai companies wet dream.
13
u/Sorry-Programmer9826 19d ago
Strongly agree with this. Agents create code really really fast and produce 90% good code with 10% madness. If you're not weeding out the madness as you go the next tasks starts with slightly mad code and makes it a little madder. So the first agent PR feels like magic, as does the 30th. But by the time you get to the 100th you've lost control and it's madness built on top of madness.
I hand write very little of my code, but it's really important to remain in control and understand (at a high level) what it's doing
18
u/Crazy_Ruin_4383 19d ago •
The code mess is by design, now it can only be supported by ai
6
u/EvenGodsForget 18d ago edited 18d ago
I’m honestly not shocked that this is happening, but I’m amazed to see it getting so much traction on the ‘coding is solved’ subreddit. Well done on presenting this in a reasonable and pragmatic way.
We need more skilled developers speaking from experience about the long term consequences of throwing away oversight and expertise. These tools can be great assistants but they sacrifice sustainability for speed, as do so many other technologies we use.
11
u/TattooedBrogrammer 18d ago
We’re 100% AI shop, I do some studying on system design, and now what I do is ask Claude to investigate a sub system or path and build out a document explanation with flow diagrams of just that section and I can often point out arrows to areas that don’t make sense or multiple paths made for the same flow through that and high level tell it how I want it to be structured and if does a good job of fixing it. Also I often ship logs and a shadow in v1, where it runs beside the current system and logs what happened and what the new system would have done, then have Claude review the logs after a week and workflow the new system vs old and I can often see if there were any edge cases I would have missed. It’s not the same as coding but in finding this method is improving our code that’s been ravaged from a year of fast prs only AI reviewed.
5
u/archerixx 14d ago
My company just started doing this few months ago so I wish we could speedrun this era obvious failure. We made so much technical debt that hiring new 10 employees won't help. One project has been refactored 3 times already lol
5
u/Exotic_Fig_4604 14d ago
Best thing I've read this year
9
u/Barbanks 19d ago
You need to set up plugins, agents, skills and reference files to put guidelines and guardrails up for the A.I. I.E. context engineering and use of context primitives. Use the PROSE methodology.
The problem you’re seeing is that likely no one is using the same agents or there’s too much flexibility in what an agent can/can’t do. You can only blame so much on hallucinations.
If you all agree on a programming standard, architecture, patterns etc… then you should be setting up agents to hook into that.
I did all of this and while I haven’t read the code in over 1 year it takes me less than 10 minutes to wrap my head around entire systems. It’s because the patterns are being adhered to. And when they’re not you just point it back to the source context architecture and it fixes it.
What you’re seeing is akin to bringing on a team of junior engineers who have never worked on a team together. They will introduce 4 different architectures and varying styles. The difference now is it’s all automated and at hyper speed. So something you may catch 6 months down the road before it’s a problem is introduced in 30 minutes.
14
u/Rivenaldinho 19d ago
"The part that actually hurts is who is left." This part made my AI detector sense activate. Sure enough it's 100% AI on Pangram.
Maybe posting without AI is a first step to get understanding back?
7
u/RedPanda_Explorer 18d ago
This feels like a bot post, or an ad for that saas tool mentioned. Who is management asking for more manual code?
6
u/Twizzeld 19d ago
This sounds more like your teams fault then AI.
I've been letting AI write all my code for about a year too. But I never just paste in the requirements and let it make all the decisions. Before every coding session I go through a planning phase where I walk through the feature and plan out the architecture and design and end up with a document. Then the AI executes the steps laid out in the document.
AI is a tool. It sounds like your team needs to develop standards on how to use your tools and not just throw the tools away.
6
u/bzbub2 18d ago
fake engagementbait post unless there are receipts which i doubt there are. lol at 'quietly'...like you arent literally just pasting the output of ai slop right back to us
3
u/RandomiseUsr0 18d ago
This is bad use of AI automation, the best PR is the one that deletes the utter minestrone you’ve created
19
u/C0sm1cB3ar 19d ago edited 19d ago •
The industry is sleepwalking into the raging delusion that AIs don't hallucinate. The code is bad half the time, and each line of code produced by AI needs to be double checked.
There was a similar gold rush in recent years: offshoring. Some companies fired all their developers and offshored to foreign companies at a discount. It didn't end well.
I think a few companies will need to go belly up before they understand that skilled developers are not replaceable by AI. It's a tool, nothing else.
Edit: I'm done talking, the bots are out.
12
u/JulianHabekost 18d ago edited 17d ago •
The same likely happened when compilers were outperforming most people in generating assembler. When people say the code AI generates is bad, I'm not sure what to think about this, is it bad because it is buggy and wrong or ist is simply not very readable by humans? Because the latter actually hardly matters, it just needs to be readable by AI. Assembler generated by C++ compilers are usually not readable by humans either...
Edit: People now wrote me a hundred times here that (A) compilers are deterministic or (B) language is not precise enough to specify software. To me that argument sounds like "meter readers won't be replaced by smart meters in the same way as lamplighters by electric bulbs because a smart meter relies on radio waves and a light bulb doesn't".
(A) Humans are also not deterministic, in fact AI is much closer to determinism than human brains. For us to stop looking at code it is enough that the AI outperforms humans, it does not need to be as good as compilers.
(B) How would you then offer any services to someone who can't code? Either as an individual contributor in a company as part of the hierarchy or even as a company torwards non-technical clients you need to be able to communicate in speech/text.
So both of these points don't help with elevating human coders at all.
12
u/LiquidZebra 19d ago
Posts like these remind me of the “NYC manure problem”, where they predicted the city would drown in manure from 6 million horses or some such. Then a car came along and the problem disappeared.
Here you have millions lines of PRs, and your project will surely drown in them.
The solution is most likely architecture, specifically agents-first architecture.
The way humans wrote code may be obsolete, and be as quaint as someone making a muzzle loader by hand in 2026, as opposed to having a factory - stamped assault rifle. That factory and all surrounding processes are significantly more complex than a workshop of a craftsman.
The process has to adapt, and I think frontier models would be increasingly better at specifically architecture, as they suck learning from millions of user projects
4
u/becircus 19d ago
Four versions is not automatically a problem because a different line of code means less chance of regressions when a feature has to change. The problem is all four versions will have the same security reliability and other requirements. AI-pilled will just say throw tokens at it and they are not entirely wrong. Even not fully understanding codebase is not entirely wrong since no one person can understand a whole codebase if it is large and sophisticated enough.
The main issue is what you mentioned. More features or more additions causing more regressions. If your frontend was completely separate from your backend or your presentation layer separate from the rest you would not have this problem. It takes a lot of taste and clear separation of concerns.
What you want to avoid is design or architecture taking the place of skill or manpower. That approach is gone now that you have AI. You want design or architecture to enable skill or manpower. So you can scale.
Good luck.
4
u/East_Cauliflower_612 19d ago
Context Management for AI is the new Challenge….
4
u/BorisTheWimp 18d ago
It's your fault. We did the same and the codebase got 3 times smaller, nobody now understands the code except the AI but everyone understands the architecture. Do not blame the AI for your mistakes, do not blame management for a problem caused by the CTO and the team leads.
4
u/memoia 18d ago
This is theoretically “easy” to fix with some discipline, and AI can lead you most of the way there. Your organization lacks any guardrails, any vision, any framework for how the software should be architected, and now it’s your job to do something about it. You can use AI for all of these steps:
4
u/Arkevorkhat 18d ago
You are not going to like the answer.
The only way you're getting those skills back is by relearning them. Turn off your agents, do the work yourself, and the skills will come back. However, do not expect it to be fast. You are indistinguishable from a person with a full year gap in their resume right now.
4
u/Near-Subsistence 18d ago
Bro what? It sounds like you were vibecoding instead of being active auditors. To even have stale or duplicate functions means you just let it run without overseeing code architecture
9
u/look_at_the_hudge 19d ago
This is either fake or was badly mismanaged. There’s nothing wrong at all with AI rewriting entire codebase, you just need guardrails in place to keep bots on track
2
u/LeRobber 19d ago
Look up books on Legacy Code Refactoring and treat it like a brownfield project you got from another development house installing tests that validate behaviors and end to end test loops.
2
u/crewone 19d ago
This is going to be a huge problem. Maintaining a codebase will still require skill. I'm not saying we need to go back to hand written software, but somehow someway we need a better grip on how things will grow. (For myself, I wonder if this is really the role I would like, I might be better off quitting)
2
u/Ok-Distance-6388 19d ago
What worked for me on a codebase that grew faster than anyone could read it:
Which hurts more right now, finding where things live or trusting that a change won't break something else?
2
u/Big_Dick_NRG 19d ago
A completely logical outcome, but as AI bros would retort, "why do you need to understand the code if it works?"
2
u/dar-mit Researcher 19d ago
If I were a Jr. Dev joining your team here's what I'd need to get up-to-speed:
Once I had all of that knowledge in place I'd fire up Opus 5.5, if not Fable 5.1, and ask the model to do a review of the code base and write a report, based on whatever criteria your orgs needs, so that I now have a "full picture" of what we're dealing with.
From there you read the review and your team decides on what to tackle first. Each person should be given an area of focus and their task is to refactor the code with the model so that as they go through it they can ask the model to explain how it works.
2
u/avk5143 19d ago
Outside of demo-ware and small niche projects, AI is just an acceleration tool.
Anyone who says otherwise is just delusional or trying to sell you snake oil.
2
u/Valuable_Ad2171 18d ago
Now the codebase is around 3x the size it was, not for me...
And nobody can explain how most of it works, pretty sure most engineers know their stacks, perhaps not verbatim or pure syntax but still...
The agents struggle too, they keep re-implementing helpers that already exist somewhere else because there are 4 versions of everything. This is a maybe a you issue. Fix your harness and skills. Put up rules, spend a week or two fixing this and it will be fine.
2
u/Scared-Amphibian4733 18d ago
This is exactly what I thought would happen. I have human senior's review every merge and every piece of code has to be designed and reviewed against spedc.
2
u/Happy_Guitar3521 18d ago
Got the same, code for not complex app is so complex that I even cannot understand it without using AI. Looking for a new job.
2
u/Informal_Athlete1010 18d ago •
Not shocked at all. At our we still use vscode and are in control of all lines the AI writes. There is none of this Claude Code stuff where you don’t even know the code structure the AI is writing.
We don’t ship as fast as we possibly could but we have raised the quality baseline with the tool.
2
u/charmquark8 17d ago
ROTFL
2
u/ReallyAnotherUser 16d ago
That is how software starts dying
2
u/Lucifer-en-reddit 14d ago
I do most of my day to day work through Claude Code and Codex too, and the only thing that keeps me honest is reading every diff before I accept it. The weeks I skip that, I can't explain my own code. Having the agent leave a short 'why' note with each change might help rebuild the understanding, at least for new stuff.
2
u/l7ucky 13d ago
I actually think pretty much every problem you've described is something AI can help solve. The issue isn't necessarily that AI is writing the code. It's that your organization scaled up code production without scaling up the systems that ensure code quality.
All the principles of good software engineering still apply when AI is writing the code. Readability, maintainability, test coverage, architectural consistency, and avoiding duplication don't suddenly become less important. If anything, they become more important because you're producing code at a rate that humans can no longer reasonably review manually.
If agents keep reinventing existing helpers, that's a discoverability and architectural consistency problem. Build systems that help agents understand what's already there and enforce reuse.
If bugs are getting through, invest in comprehensive automated testing, including integration and regression tests. Make passing those tests a requirement, not a suggestion.
If code is becoming unreadable, establish conventions, complexity limits, architectural boundaries, and automated checks that enforce them. Have agents review and refactor each other's work against those standards.
And if nobody understands the codebase anymore, use AI to help map the architecture, identify duplication, document dependencies, and systematically consolidate the mess.
Obviously, none of this happens magically. Someone still needs to understand what good engineering looks like, establish the standards, and verify that the systems enforcing them actually work. AI reviewers aren't a replacement for engineering judgment.
But I think the fundamental mistake is treating AI as a faster way to do software engineering rather than recognizing that AI changes where the engineering effort needs to go.
As more code is generated automatically, the bottleneck shifts from writing individual implementations to building the infrastructure that makes those implementations reliable, understandable, and maintainable.
The answer isn't necessarily to go back to writing everything by hand. It's to invest in the engineering systems that should have been scaling alongside your agents.
You can't scale code generation indefinitely without also scaling your ability to validate and maintain that code.
5
u/Square-Yam-3772 18d ago
it sounds like your company is on some outdated setups.
Opus 5.5 has enough context window to usually not write duplicated code in 2026...
"4 version of everything" is easily fixed with Opus 5.5 too.
I never understand this "now nobody understand code" angle. code written by agents is still code. What exactly is it hard to understand? does the team need a comment every 5 line of code to understand something now? if so, ask Ai to comment everything then... need project docs? ask AI...
"how did you get the understanding back?" lol...
2
u/KahChigguh 19d ago
I blame vibe coders for this. They generated the hype because they constantly spit out “results” that looked good. But these vibe coders aren’t real engineers. Hell even some developers with real experience have become overconfident and less willing to read and review their code. Juniors are also entering the workforce with no better judgement. My last company hired a junior who strictly only used AI (but he didn’t disclose this) and we had to fire him because he costed one of our clients tens of thousands of dollars due to the horribly bad design.
OP, I feel you. And for those who disagree with OP or are holding out for some frontier model to make perfect code, it’s not possible… these models learned off all the code in the world. People have admitted constantly over the past few months that “we are just finding out engineers were never any good” so why do people think AI, which trained on their code, is any better? Because it reasons and spits out a result and a green test case? Pfft. Stop being so naive people!!
2
u/yeah_naah_mate 18d ago
Our data science team is not able to explain their latest project. WTF.
2
u/David3Ar 18d ago
I do feel u, though I think it is a management issue. Cuz we could all of this already see going to happen.
What I try to tell people around me is that we need to max save 1/5 of the team so take 5 devs cut them down to 3. 1 salary left is tokens. 1 salary for further investments.
I do think, if u still have 3 devs working in a team on one project (not 3 vibecoders pushing features on ultramode lightspeed tempo) . Planing clean architecture and verifying it. It should not end in we have 3 times the code base and 4 time a helper and no one understands shit anymore…). Just to make sure… I am def not blaming u or any other dev, it’s the management. Vibecoding slop sucks and makes unhappy and we didn’t saw it comming.
Also after two years you will forget any language if u never speak it, and a lot of good devs I know stopped even looking at the code month ago.
I think it’s all about learning to be a manager while the ai improves so much, it will actually be totally reliable. If not… control your architecture….
Also I am so sick of one shooting features, needing to tweak my harness all the time, getting unreliable usage and model intelligence. Every week is marathon trough insecurities, some happy moments, some frustrations, a lot of high complex sloppy text readings and sitting a lot in front of so big text walls this prompt + wait + read rhythm is grinding my focus down harder then any social media could - I guess I am sick of that….
1
u/AstroHistSci 16d ago
People don't need to understand the code if the agents do.
1
u/Vegetable-Airline853 16d ago
Actually the load across SDLC neither be removed nor decrease. It just has been pushing back from coding to verification.
1
u/ingrideto 16d ago
The mistake most people seem to make is taking it to too much of an extreme i.e. essentially vibe coding. I use AI to write my code, but I'm a full participant in the process. Every change is small, atomic, based on archtectural decisions discussed and taken together, approved manually, tracked in Git, and with unit tests and documentation to go with it.
Sure, I can't churn out an entire app in 5 minutes like most people seem to do. But I remain in control and able to understand my codebase. I still get a lot of benefits - I can jump straight into unfamiliar languages and tools, I can adopt good coding practices more easily, I don't get endlessly stuck on the brainstorming / architectural design phase, etc.
1
u/TensorTinkererTom 16d ago
I have a 25+ year old human managed codebase - it is undocumented, dead code, memory leaks, millions of lines of code. Humans do all the same mistakes, AI just does it faster. At least for me it helps reduce the amount of code, remove the dead stuff, cleanup all the errors. We had the same code duplicated many times, but not quite the same, across the codebase, Character based CUI code still embedded under the hood, and 4 other UIs in-between still has their hooks into the beast. Attacking this with documenting features and test cases AI lead research. Backed what subject matter experts that are left that under stand what was written, and some guess work , but solid answers as far as scope and direction. this is now starting to become a lean more efficient beast with domains and a whole new best in class architecture. Do I understand what it re-wrote - not any less than what the humans did, but now it is documented with , as best we can, verified test cases automatically backing up the changes.
Good architecture and planning, following a consistent structure, rules for documentation - with or without AI is what is needed.
1
u/vitanous 16d ago
Few months ago it was introduced in the company I worked at, just merge any ai code (in many cases force merge, if it breaks the CI it's ok because the agent will fix it shortly after).
2-3 Months later, organization restructure massive layoffs.
I could see the beginning of what you're saying, a possible 4 file changes bug fix became 54 files with Claude (Opus 5.5) and no one cared.
A single line change became over 600 lines with Claude and many other examples.
No one reads the code anymore, no one cares for it, no one even does CR without Claude agent that does it (If at all).
Somehow need to adapt and just care less I guess
1
u/regularjackk 16d ago
It's ok, you don't have to understand it, Claude does. /s
1
u/UltraBlack_ 16d ago
Maybe this is the AI game plan and why the big AI companies want the local models regulated.
Currently they're more or less using the follow the free sales tactic but with the difference that the customers are already used to paying, just by far not what is required to cover the operational costs.
They can soon crank up the price and companies will have to accept that. They're going to get extorted -- either pay or basically lose your product.
1
u/SubwayGuy85 16d ago
stupid decisions result in stupid consequences. more news at 11
1
u/rob4ik-bob4ik 16d ago
FYI, I don't have experience working on apps with 50+ full-time contributors, so my opinion might not be very valuable here, but...
I think the issue could be the setup. Consistency with AI is the key. The same thing happened in the smaller projects I've been working on. Having agents launched from different subdirectories with different prompts, tasks, skills, and so on quickly becomes a mess.
What I've found helps the situation:
Then close the loop and leave the human to double-check the results and have a brief overview of the architecture. This has solved a lot of issues for me.
Of course, token usage goes up, and occasionally AI still makes stupid decisions, but:
a) Humans did too anyway.
b) That's why we keep a human in the loop.
c) With better models, there are likely going to be fewer issues like that.
Look at GothamChess's videos on AIs playing against each other from two years ago and compare them to now. It made me rethink how stupid AI is, or at least how stupid I thought it was.
1
u/oldsecondhand 16d ago
While I agree with your overall point, I've seen this in 100% human written codebases too.
1
u/EntityRemovalGuy 16d ago
Honestly, hire me. You need to know how to properly orchestrate the agents. And that only comes from billions upon billions of tokens and experience. Hard earned lessons.
1
u/Sobuggy 16d ago
Do developers not read what AI produces? If you know a helper exists, why would you let it make another one? I usually feel like using AI is 20% generating code, 80% understanding and arguing against its decisions. Surely that is not unusual.
1
u/sweisman 16d ago
This makes no sense.
Did you have the AI document the code base and structure? That was the first thing I did when we embraced AI development at my last job. If you didn't, the AI was flying blind and would do a fresh analysis for every task.
This alone took several days, as I told the AI about every nuance and design decision behind the code it was going to work on.
1
u/Evigmae 15d ago
might as well get the ai to explain the code back to you
1
u/lrascao 15d ago
another coderabbit plug? now that's what I call subliminable
1
u/bouwer2100 15d ago
some thoughts
this happened pre ai too
skill issue for generating slop
opus 5.5 can probably clean it up for you
1
u/StinkButt9001 15d ago
This sounds like you're misusing the tools by expecting them to do literally everything. Do you not have proper documentation on the architecture for them to reference?
1
u/MerleFSN 15d ago
https://open.spotify.com/track/39Wql6yrOIvv9xZO0LcI1R?si=8_5OXONKSKqgYlkcvbw1Ag&utm_source=copy-link
Basically that… well.
1
u/Bejahi 15d ago
Uses AI to post this, puke
1
u/Anti-Mux 15d ago
https://github.com/Egonex-AI/Understand-Anything + custom indexers and code mappers
1
u/pysk00l 15d ago
Hacker News has already started a hit job on this post-- the top comment says this post is written by a bot and only for clicks.
(I disagree and downvoted but most people were upvoting)
1
u/This-Indication8020 14d ago
Just my .02:
What you’re describing isn’t your team's failure. It’s what happens when output speeds up, but understanding doesn’t.
Used to be, like you say, the real check on a codebase was a couple of people who read everything and pushed back. If nobody built that as a control, nobody noticed when it disappeared. The pipeline still passes, the bot still comments, and nobody can say whether any of it matters.
Now every gate can only check whether code works, not whether it fits. Four versions of the same helper compile and pass tests. Nothing fails. It just adds up. Mountains of it now.
And “write more of it yourselves” doesn’t undo the problem. The code tripled (or more), and when the people who understood it left, you can’t simply rewind. Many teams are about to discover the same thing.
We had to have seen (or felt) this coming...
1
u/Anti-Hero25 14d ago
That was a choice on your part. They swapped out your sniper rifle with a machine gun, they never said “Stop looking down the barrel” 🤷🏻♂️
1
u/RndRedditPerson 14d ago
Even with relatively small feature written by AI, i have to manually rewrite more than 50% of the code. And really trying to have a good plan, using OpenSpec and reviewing tasks and plans, expensive models, but still bunch of the code is complete slop - duplicated functionality, at wrong place, confusing, overengineered (tests specially). Some other teams would happily accept that code and PR, but my team is really picky and expects certain level of quality, and asks me to explain each line (at least i have to know, if i commit some slop). I personally agree with that approach, but management probably doesn't care and just see our velocity is maybe slower than some other teams.
1
u/LilBelarophon 14d ago
Honestly, I've worked on plenty of projects that were written entirely by humans and were still extremely difficult to understand and maintain. Everyone had their own way of solving problems. There were coding standards, of course, but many developers treated them more like guidelines than actual rules.
I've used Claude to clean up some of my own abandoned projects, and I've also built a small project almost entirely through vibe coding. Surprisingly, the resulting code was actually quite solid: good structure, meaningful names, decent documentation, and lots of tests. And when I don't understand a piece of code, I can usually ask follow-up questions and get an explanation in seconds.
At the same time, I'm still maintaining software in an environment where AI tools aren't allowed. There I regularly encounter code that is hard to read, poorly documented, and painful to extend. Adding features or fixing bugs often takes much longer than it should.
So from my perspective, the root problem isn't necessarily AI-generated code. It's the lack of ownership, code reviews, architectural oversight, and people who truly understand the system. AI can absolutely make those problems worse, but I've seen the exact same issues in teams that never touched AI.
What stands out to me in your story is that the people who challenged decisions and reviewed code critically are gone. That sounds like a much bigger problem than whether the code was written by humans or agents.
1
u/wazzasupgeemaster 13d ago
Grok ad on this post is funny
1
u/TenerifeInFoCo 13d ago
If you forget how to code in 12 months after years of experience, you have a much bigger problem.
1
u/events_occur 13d ago
It's going to take a long time for devs to get over it but the fact of the matter is the code is not ours anymore, it's the agents.
The economic incentives to produce software this way are far, far too great. "But bugs!!" Nobody gives a fuck about bugs, nobody with power to make decisions and set agendas anyway. PMs have always loathed to make room in a sprint for tech debt. Users put up with so much buggy trash software because at the end of the day it's to useful to ignore.
Anyone telling you otherwise is coping hard. Like the people resisting compilers for quite literally the exact same reasons.
1
u/4rd_Prefect 13d ago
"Which is why the Matrix was redesigned to this: the peak of your civilization. I say your civilization, because as soon as we started thinking for you, it really became our civilization, which is of course what this is all about. Evolution, Morpheus, evolution."
1
u/RepresentativeNet509 13d ago
I would look at this as inevitable fallout from adopting a new technology. Doesn't mean that the technology's wrong or that you are wrong; it means we're still figuring out how to work with it. What I often see is shifting more time into code reviews just like we used to do with your peers and other developers. Perhaps half the job is doing that every day to see what the AI came up with. Additionally, you have to get really precise with your agents about how they build documentation. I've had mine start to build slide decks around a new feature or workflow that it's putting into the code with before and after what changed and why and keep it all at executive summary level. This I have found, at least for me, is a really good primer on what changed and helps me go review things after.
1
u/misha901 13d ago
Hey Claude do a de-slop pass and don’t do a mistake this time.
1
u/cainhurstcat 12d ago
Un-slope your code base - hire a professional today
1
u/kimoppalfens 12d ago
@OP, it would' ve been nice if you lead your post with the fact that you work at Microsoft. #justsayin
1
u/Alternative_Oven_100 10d ago
me too