Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I feel like Claude Code is starting to fall over from being entirely written by LLMs. How do you even begin to fix precise bugs in a 1M+ LOC codebase all written by AI? It seems like LLMs are great for quickly adding large new features but not great for finding and fixing edge-cases.




This is real. I’ve seen some baffling bugs in prompt based stop hook behavior.

When I investigated I found the docs and implementation are completely out of sync, but the implementation doesn’t work anyway. Then I went poking on GitHub and found a vibed fix diff that changed the behavior in a totally new direction (it did not update the documentation).

Seems like everyone over there is vibing and no one is rationalizing the whole.


I’m happy to throw an LLM at our projects but we also spend time refactoring and reviewing each other’s code. When I look at the AI-generated code I can visualize the direction it’s headed in—lots of copy-pasted code with tedious manual checks for specific error conditions and little thought about how somebody reading it could be confident that the code is correct.

I can’t understand how people would run agents 24/7. The agent is producing mediocre code and is bottlenecked on my review & fixes. I think I’m only marginally faster than I was without LLMs.


> with tedious manual checks for specific error conditions

And specifically: Lots of checks for impossible error conditions - often then supplying an incorrect "default value" in the case of those error conditions which would result in completely wrong behavior that would be really hard to debug if a future change ever makes those branches actually reachable.


I always thought that the vast majority of your codebase, the right thing to do with an error is to propagate it. Either blindly, or by wrapping it with a bit of context info.

I don’t know where the LLMs are picking up this paranoid tendency to handle every single error case. It’s worth knowing about the error cases, but it requires a lot more knowledge and reasoning about the current state of the program to think about how they should be handled. Not something you can figure out just by looking at a snippet.


Training data from junior programmers or introductory programming teaching material. No matter how carefully one labels data, the combination of programming’s subjectivity (damaging human labeling and reinforcement’s effectiveness at filtering around this) and the sheer volume of low-experience code in the input corpus makes this condition basically inevitable.

Garbage in garbage out as they say. I will be the first to admit that Claude enables me to do certain things that I simply could not do before without investing a significant amount of time and energy.

At the same time, the amount of anti-patterns the LLM generates is higher than I am able to manage. No Claude.md and Skills.md have not fixed the issue.

Building a production grade system using Claude has been a fools errand for me. Whatever time/energy i save by not writing code - I end up paying back when I read code that I did not write and fixing anti-patterns left and right.

I rationalized by a bit - deflecting by saying this is AI's code not mine. But no - this is my code and it's bad.


> At the same time, the amount of anti-patterns the LLM generates is higher than I am able to manage. No Claude.md and Skills.md have not fixed the issue.

This is starting to drive me insane. I was working on a Rust cli that depends on docker and Opus decided to just… keep the cli going with a warning “Docker is not installed” before jumping into a pile of garbage code that looks like it was written by a lobotomized kangaroo because it tries to use an Option<Docker> everywhere instead of making sure its installed and quitting with an error if it isn’t.

What do I even write in a CLAUDE.md file? The behavior is so stupid I don’t even know how to prompt against it.


> I don’t know where the LLMs are picking up this paranoid tendency to handle every single error case.

Think about it, they have to work in a very limited context window. Like, just the immediate file where the change is taking place, essentially. Having broader knowledge of how the application deals with particular errors (catch them here and wrap? Let them bubble up? Catch and log but don't bubble up?) is outside its purview.

I can hear it now, "well just codify those rules in CLAUDE.md." Yeah but there's always edge cases to the edge cases and you're using English, with all the drawbacks that entails.


I have encoded rules against this in CLAUDE.md. Claude routinely ignores those rules until I ask "how can this branch be reached?" and it responds "it can't. So according to <rule> I should crash instead" and goes and does that.

The answer (as usual) is reinforcement learning. They gave ten idiots some code snippets, and all of them went for the "belt and braces" approach. So now thats all we get, ever. It's like the previous versions that spammed emojis everywhere despite that not being a thing whatsoever in their training data. I don't think they ever fixed that, just put a "spare us the emojis" instruction in the system prompt bandaid.

This is my biggest frustration with the code they generate (but it does make it easy to check if my students have even looked at the generated code). I dont want to fail silently or hard code an error message, it creates a pile of lies to work through for future debugging

Writing bad tests and error handling have been the worst performance part of Claude for me.

In particular writing tests that do nothing, writing tests and then skipping them to resolve test failures, and everybody's favorite: writing a test that greps the source code for a string (which is just insane, how did it get this idea?)


Seriously. Maybe 60% of the time I use claude for tests, the "fix" for the failing tests is also to change the application code so the test passes (in some cases it will want to make massive architecture changes to accomodate the test, even if there's an easy way to adapt the test to better fit the arch). Maybe half the time that's the right thing to do, but the other half the time it is most definitely not. It's a high enough error rate that it borderlines on useful.

Usually you want to fix the code that's failing a test.

The assumption is that your test is right. That's TDD. Then you write your code to conform to the tests. Otherwise what's the point of the tests if you're just trying to rewrite them until they pass?


Or deleting the test files to make all tests pass. It’s my personal favorite.

I switched to OpenCode, away from Claude-Code, because Claude-Code is _so_ buggy.

>Seems like everyone over there is vibing and no one is rationalizing the whole.

Claude Code creator literally brags about running 10 agents in parallel 24/7. It doesn't just seems like it, they confirmed like it is the most positive thing ever.


It's software engineering crack. Starting a project feels amazing, features are shipping, a complex feature in the afternoon - ezpz. But AI lacks permanence, for every feature you start over from scratch, except there is more of codebase now, but the context window is still the same. So there is drift, codebase randomizes, edge cases proliferate, and the implementation velocity slows down.

Full disclosure - I am a heavy codex user and I review and understand every line of code. I manually fight spurious tests it tries to add by pointing a similar one already exists and we can get coverage with +1 LOC vs +50. It's exhausting, but personal productivity is still way up.

I think the future is bright because training / fine-tuning taste, dialing down agentic frameworks, introducing adversarial agents, and increasing model context windows all seem attainable and stackable.


I usually have multiple agents up working on a codebase. But it's typically 1 agent building out features and 1 or 2 agents code reviewing, finding code smells, bad architecture, duplicated code, stale/dead code, etc.

I'm definitely faster, but there's a lot of LLM overhead to get things done right. I think if you're just using a single agent/session you're missing out on some of the speed gains.

I think a lot of the gains I get using an LLM is because I can have the multiple different agent sessions work on different projects at the same time.


I think that the current test suite is far too small. For the Claude Code codebase, a sensible next step would be to generate thousands of tests. Without that kind of coverage, regressions are likely, and the existing checks and review process do not appear sufficient to reliably prevent them. My request is that an entirely LLM-written feature should only be eligible for merge once all of those generated tests pass, so we have objective evidence that the change preserves existing behavior.

I know at least one of the companies behind a coding agent we all have heard of has called in human experts to clean up their vibe coded IAC mess created in the last year.

What else could they do? If they don't vibecode Claude Code it is a bad look.

omg are you me? I had this exact same problem last week

> When I investigated I found the docs and implementation are completely out of sync, but the implementation doesn’t work anyway.

That is not an uncommon occurrence in human-written code as well :-\


Someone said it best after one of those AWS outages from a fat-fingered config change:

> Automation doesn't just allow you to create/fix things faster. It also allows you to break things faster.

https://news.ycombinator.com/item?id=13775966

Edit: found the original comment from NikolaeVarius


> I feel like Claude Code is starting to fall over from being entirely written by LLMs.

The degradation is palpable.

I have been using vscode github copilot chat with mostly the claude opus 4.5 model. The underlying code for vscode github copilot chat has turned to shit. It will continuously make mistakes no matter what for 20 minutes. This morning I was researching Claude Code and pricing thinking about switching however this post sounds like it has turned to shit also. I don't mind spending $300-$500 a month for a tool that was a month ago accomplishing in a day what would take me 3-4 days to code. However, the days since the last update have been shit.

Clearly the AI companies can't afford to run these models at profit. Do I buy puts?


I think you can keep the vibe coding totally under control with good tests. I'm baffled how such a huge regression would not be caught.

Then again, the google home page was broken on FF on Android for how long?


Not my experience at all when I occasionally try making something purely coded by AI for fun. It starts off fine but the pile of sub-optimal patterns slowly builds towards an unmaintainable mess with tons of duplication of code, and state that somehow needs to be kept in sync. Tests and linters can't test that the code is actually reasonable code...

Doesn't mean it's not a useful tool - if you read and think about the output you can keep it in check. But the "100% of my contributions to Claude Code were written by Claude Code" claim by the creator makes me doubt this is being done.


Using AI doesn’t really change the fact that keeping ones and zeroes in check is like trying to keep quicksand in your hands and shape it.

Shaping of a codebase is the name of the game - this has always been, and still, is difficult. Build something, add to it, refactor, abstraction doesn’t sit right, refactor, semantics change, refactor, etc, etc.

I’m surprised at how so few seem to get this. Working enterprise code, many codebases 10-20 years old could just as well have been produced by LLMs.

We’ve never been good at paying debt and you kind of need a bit of OCD to keep a code base in check. LLM exacerbates a lack of continuous moulding as iterations can be massive and quick.


I was part of a big software development team once and that necessity I felt there, namely, being able to let go of the small details and focusing on the big picture is even more important when using llms.

Everyone has been stressing over losing their job because of AI. I'm genuinely starting to think this will end in 5x more work needing to clean up the mess caused. Who's going to maintain all this generated code?

That's what I'm worried about. I hate cleaning up AI code now from contractors. If that's going to be the future of this gig, I'm out.

Nobody is going to maintain it, the spec that generated it will be given to better systems and it will be rewritten.

That would be possible if you had just the spec, but after sometime most of the code will not have been generated through the original spec, but through lots of back and forth for adding features and big fixing. No way to run all that again.

Not that old big non-AI software doesn't have similar maintainability issues (I keep posting this example, but I don't actually want to callthat company out specifically, the problem is widespread: https://news.ycombinator.com/item?id=18442941).

That's why I'm reluctant to complain about the AI code issues too much. The problem of how software is written, on the higher level, the teams, the decisions, the rotating programmers, may be bigger than that of any particular technology or person actually writing the code.

I remember a company where I looked at a contractor job, they wanted me to fix a lot of code they had received from their Eastern European programmers. They complained about them a lot in our meeting. However, after hearing them out I was convinced the problem was not the people generating the code, but the ones above them who failed to provide them with accurate specs and clear guidance, and got surprised at the very end that it did not work as expected.

Similar with AI. It may be hard to disentangle what is project management, what is actually the fault of the AI. I found that you can live with pockets of suboptimal but mostly working code well enough, even adding features and fixing bugs easily, if the overall architecture is solid, and components are well isolated.

That is why I don't worry too much about the complaints here about bad error checks and other small stuff. Even if it is bad, you will have lots of such issues in typical large corporate projects, even with competent people. That's because programmers keep changing, management focuses on features over anything else (usually customers, internal or external, don't pay for code reorg, only for new features). The layers above the low level code are more important in deciding if the project is and remains viable.

From what the commenters say, it seems to me the problem starts much higher than the Claude code, so it is hard to say how much at fault AI generated code actually is IMHO. Whether you have inexperienced juniors or an AI producing code, you need solid project lead and architecture layers above the lines of code first of all.


This really feels like a faith-based argument. That's not possible today

I'd much rather make plans based on reality


> Who's going to maintain all this generated code?

Other AI agents, I guess. Call Claude in to clean up code written by Gemini, then ChatGPT to clean up the bugs introduced by Claude, then start the cycle over again.


This is probably tongue in cheek, but I literally do this and it works.

I've had one llm one-shot a codebase. Then I use another one to review (with a pretty explicit prompt). I take that review and feed it to another agent to refactor. Repeat that a bunch of times.


It won't be maintained — quality will decrease forever.

Or: We throw it all out and call the next iterations "version 2."

If the code is cheap (and it certainly is), then tossing it out and replacing it can also be cheap.


In the cloud with a micro-service architecture this just makes sense. Expose an API and call it a day, who cares what's behind the API as long as it follows the spec.

Most of us in the financial side of this space think so as well. This is why AI Ludditism doesn't make sense - CAT Hydraulic Excavators didn't end manual shovelers, it forced them to upskill.

Similarly, Human-in-the-loop utilization of AI/ML tooling in software development is expected and in fact encouraged.

Any IP that is monetizable and requires significant transformation will continue to see humans-in-the-loop.

Weak hiring in the tech industry is for other reasons (macro changes, crappy/overpriced "talent", foreign subsidies, demanding remote work).

AI+Competent Developer paid $300k TC > Competent Developer paid $400k TC >>> AI+Average Developer paid $30k TC >> Average Developer paid $40k TC >>>>> Average Developer paid $200k TC


> AI+Competent Developer paid $300k TC > Competent Developer paid $400k TC >>> AI+Average Developer paid $30k TC >> Average Developer paid $40k TC >>>>> Average Developer paid $200k TC

Huh?


As in the ranking/mental model increasingly being used by management in upper market organizations.

A Coding copilot subscription paired with a competent developer dramatically speeds up product and feature delivery, and also significantly upskills less competent developers.

That said, truly competent developers are few and far between, and the fact that developers in (eg.) Durham or remote are demanding a SF circa 2023 base makes the math to offshore more cost effective - even if the delivered quality is subpar (which isn't neccesarily true), it's good enough to release, and can be refactored at a later date.

What differentiates a "competent" developer from an "average" developer is the learning mindset. Plenty of people on HN kvetch about being forced to learn K8s, Golang, Cloud Primitives, Prompt Engineering, etc or not working in a hub, and then bemoan the job market.

If we are paying you IB Associate level salaries with a fraction of the pedigree and vetting needed to get those roles, upskilling is the least you can do.

We aren't paying mid 6 figure TC for a code monkey - at that point we may as well entirely use AI and an associate at Infosys - we are paying for critical and abstract thinking.

As such, AI in the hands of a truly competent engineer is legitimately transformative.

Tl;dr - Mo' money, Mo' expectations


Those covid years really skewed the market lol

PS. In the 5 minutes between starting and finishing writing the parent comment https://claude.ai/settings/usage just stopped displaying my quota usage... fun.

Edit: And 3 minutes later it is back...


Be careful with that confidence. Sometimes the AI changes the test when the test tells the AI it's recent changes broke something.

You can see if a test is changed. If you're paranoid like I am, you can simply make the tests read-only for the user you're running the agent from.

Not just tests.

I run multiple agents in separate sessions. It starts with one agent, building out features or working on a task/bug fix. Once it gets some progress, I spin up another session and have it just review the code. I explicitly tell it things to look out for. I tell it to let me know about things I'm not thinking of and to make me aware of any blind spots. Whatever it reviews I send back to the agent building out features (I used to also review what the review agent told me about, but now I probably only review it like 20% of the time). I'll also have an agent session started just for writing tests, I tell it to look at the code and see if it's testable, find duplicate code, stale/dead code. And so on and so forth.

Between all of that + deterministic testing it's hard for shit to end up in the code base.


I think you underestimate how impossible of a task it is to write sufficient test coverage to keep AI in line

You can assert that something you want to happen is actually happening

How do you assert all the things it shouldn't be doing? They're endless. And AI WILL mess up

It's enough if you're actively reviewing the code in depth.. but if you're vibe coding? Good luck


How do we check humans’ work for these unknown errors?

An expectation of professionalism, training and written material on software design, providing incentives (like promotions) to not produce crap, etc.

It's not a world where everything produced is immediately verified.

If a human consistently only produced the quality of work Claude Opus 4.5 is capable of I would expect them to be fired from just about any job in short order. Yes, they'd get some stuff done, but they'd do too much damage to be worth it. Of course humans are much more expensive than LLMs to manage so this doesn't mean it can't be a useful tool... just it's not that useful a tool yet.


Humans may be prone to err, but they don't confabulate like LLMs do. Also, the unit tests are done by people who know intimately the expected behavior of the code, which surprisingly, it's frequently the same programmer.

This can be abused because the programmer is both judge and jury, but people tend to handle this paradox much better than LLMs.


We have many layers to prevent them:

1. Competent humans architecting and leading the system who understand the specs, business needs, have critical thinking skills and are good at their job

2. Automated tests

3. Competent human reviewers

4. QA

5. Angry users

Cutting out 1 and 3 in favor of more tests isn't gunna work


Ugh, I just think everyone in these threads are talking past each other.

I'm personally not advocating for not having humans in the loop. I don't know of anybody using llm tools or advocating for them that are saying there shouldn't be humans in the loop. "vibe coding" seems to mean different things to different people.


Whose going to write those good tests, and are they going to write them or disable them cause they dont work.

I've been trying opencode a bit with gemini pro (and claude via those) with a rust project, and I have a push pre-hook to cargo check the code.

The amount of times I have to "yell" at the llm for adding #[allow] statements to silence the linter instead of fixing the code is crazy and when I point it out they go "Oops, you caught me, let me fix it the proper way".

So the tests don't necessarily make them produce proper code.


I was doing a somewhat elaborate form/graph in Google Worksheets, had to translate a bunch of cells from English to Spanish, and said "Why not use Gemini for this easy, grunt work? They tend to output good translations".

I spent 20 minutes between guiding it because it was putting the translation in the wrong cells, asking it not to convert the cells to a fancy table, and finally, convincing it that it really had access to alter the document, because at some point it denied it. I wasn't being rude, but it seems I somehow made it evasive.

I had to ask it to translate in the chat, and manually copy-pasted the translations in the proper cells myself. Bonus points because it only translated like ten cells at a time, and truncated the reply with a "More cells translated" message.

I can't imagine how hard it would be to handhold an LLM while working in a complex code base. I guess they are a godsend for prototypes and proofs of concept, but they can't beat a competent engineer yet. It's like that joke where a student answers that 2+2=5, and when questioned, he replies that his strength is speed, not accuracy.


This is one of those places I feel like they're trying to do too much with the LLMs and I think this is one of those places where there's "a bubble". I feel like the LLMs are text tools, so trying to take them out of their domain and force them somewhere else you're going to have problems.

Anyways, I replied because I had something else I wanted to say.

I was using Gemini in a google worksheet a while back. I had to cross reference a website and input stuff into a cell. I got Gemini to do it, had it do the first row, then the second, then I told it to do a batch of 10, then 20. It had a hiccup at 20, would take too long I guess. So I had it go back to 10. But then Gemini tells me it can't read my worksheet. I convince it that it can, but then it tells me it can't edit my worksheet. I argue with it, "you've been changing the worksheet wtf?" I convinced it that it could and it started again, but then after doing a couple it told me it couldn't again. We went back and forth a bit, I'd get it working, it would break, repeat. I think it was after the third time I just couldn't get it to do it again.

I looked up the docs, searched online, and I was concerned that I found Google didn't allow Gemini to do a lot of stuff to worksheets/docs/other google workspace stuff. They said they didn't allow it to do a ton of stuff that I definitely had Gemini doing.

Then a week or two went by and google announced they're allowing gemini to directly edit worksheets.

So wtf how did I get it to do it before it could do it???


I added a bunch of lines telling it to never do that in CLAUDE.md and it worked flawlessly.

So I have a different experience with Claude Code, but I'm not trying to say you're holding it wrong, just adding a data point, and then, maybe I got lucky.


I'm curious how many of those directives you'll have in that file at the end of the year.

I think it won't be bigger than the giant set of rules people are supposed to read through (they never do) when onboarding.

At least with AGENTS/CLAUDE.md file, you know the agent will re-read those rules on every new session.


Why are you guys having LLMs use git at all???

Manage that yourself! If you have hooks throwing errors then feed the error back into the llm.


You don't. These seems to be this idea that LLMs can do it all, but the reality is that it itself has limited amounts of memory, and thus context.

And this is not tied to the LLMs. It's that to EVERYTHING we do. There are limits everywhere.

And for humans the context window might be smaller, but at least we have developed methods of abstracting different context windows, by making libraries.

Now, as a trade-off of trying to go super-fast, changes need to be made in response to your current prompts, and there is no time validate behavior in cases you haven't considered.

And regardless of whether you have abstractions in libraries, or whether you have inlined code everywhere, you're gonna have issues.

With libraries changes in behavior are going to impact code in places you don't want, but also, you don't necessarily know, as you haven't tested all paths.

With inlined code everywhere you're probably going to miss instances, or code goes on to live its own life and you lose track of it.

They built a skyscraper while shifting out foundational pieces. And now a part of the skyscraper is on the foundation of your backyard shed.


Just like a leveraged ETF, the returns are twice as good when things are on the up and up, but when you dig a hole it takes three times the effort to dig yourself out because now going down twice as fast, and you're also paying interest (ie, you have no clue where the bodies are burried as you bury them twice as fast).

Despite having written a few books on LLM applications I use them sparingly for coding: to design and get started, and occasionally for debugging. I have no interest criticizing other people’s practices but I enjoy mostly writing code myself.

structural (team) recursion and statistical output don't mesh well together ?

This explanation fits my intuition, but from an outsider's perspective, I can't say the user experience with claude code is noticeably more bug-ridden than what is typical for a rapidly scaling startup rushing crap out the door. It's vibes all the way down.

vibe around and find out

folks have created software by "vibe coding". It is now time to "face the music" when doing so for production grade software at scale.


LLMs have been great at finding and fixing edge cases in my experience. It's a useful tool for improving software quality.

You do it the same way you fix every other disaster of a code-base. You add a ton of tests and start breaking it up into modules. You then rewrite each module/component/service/etc. one at a time using good practices. That's how every project gets out of the muck.

That's a big, slow, and expensive process though.

Will Anthropic actually do that or will they keep throwing AI at it and hope the AI figures this approach out? We shall see...


With the competition biting at their heels I don't think they have time to do that. They're stuck with what they have. At least until innovation settles a little

think this particular complaint is about claude ai - the website - and not claude code. I see your point though.

What differences do you see between AI written codebases and a codebase written by engineers? Both parties create buggy code, but I can imagine the types of bugs are different. Is it just that bug fixing doesn't really scale because we don't have the ability to chomp down 1M+ LOC codebases into LLM context?

Wishful thinking. Lol. It’s GPu related

compaction actually reduces GPU usage?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: