Live data from Hacker News

AI Agents and the Refactoring That Never Happens

rosenfeld.page

41–50 of 76 posts

Re: AI Agents and the Refactoring That Never Happens

#41
I disagree with the claim that "AI agents don't get lost." What I've observed instead is that they don't experience the sensation of feeling lost. Which is quite different.

This summer I spent quite a while using a coding agent to help me untangle a deep and complicated data processing pipeline. It had itself been built by agents, in a remarkably short amount of time. But it had also become clear that it was riddled with errors and was producing lots of bad data.

What I quickly discovered was that upwards of half of my questions would receive very confidently wrong answers. And even once I had finally diagnosed whatever problem I was currently working on, it was difficult to trust the agent with any bug fixes. Since it was having an even harder time tracing data flows than I was (I'll take this chance to submit for your consideration that faster is not necessarily better), it was proving to be a bit of a monkey's paw. Yes, it would fix the exact bug I asked it to fix, but typically introduce new defects in the process. And yes, I was having this struggle with all of the latest & greatest models.

I ultimately concluded that, in this codebase, the agent was indeed deeply, hopelessly lost. (edit: And probably this code got so bad in the first place because the agents that were used to build it had been lost for a while, but unable to recognize this problem and call their operators' attention to it.)

Re: AI Agents and the Refactoring That Never Happens

#42

I disagree with the claim that "AI agents don't get lost." What I've observed instead is that they don't experience the sensation of feeling lost. Which is quite different. This summer I spent quite a while using a coding agent to help me untangle a deep and complicated data processing pipeline. It had itself been built by agents, in a remarkably short amount of time. But it had also become clear that it was riddled…

This is a really good take. Thanks for sharing this. I havent been able to put to words how I have felt about agents being untrustworthy.

Re: AI Agents and the Refactoring That Never Happens

#43

Meanwhile I'm over here refactoring as much as I can from years (or decades) of human-slung code. Turning the mess I either inherited, helped create, or built on top of into something clean and pristine might be my favorite LLM use. Same for personal projects, codebases that evolved over many years when I happened to have time that weren't kept quite as "clean" as I wish that finally been cleaned up. I've always _wan…

Hear, hear. As a lazy dev, LLMs allow me to write so much better code than ever before, and refactor all the crap I never got around to fixing.

Re: AI Agents and the Refactoring That Never Happens

#44

I disagree with the claim that "AI agents don't get lost." What I've observed instead is that they don't experience the sensation of feeling lost. Which is quite different. This summer I spent quite a while using a coding agent to help me untangle a deep and complicated data processing pipeline. It had itself been built by agents, in a remarkably short amount of time. But it had also become clear that it was riddled…

I'm curious about your exact case. In my experience I often had luck with evidence based approaches where the agent had to prove something first in order to make a statement (or write/do some tests first before making claims).

I agree though that one has to be very careful when trying to "fix" things with agents in a big codebase without it introducing new defects.

Re: AI Agents and the Refactoring That Never Happens

#45
> Teams, em dash bla bla bla em dash have quietly bla bla bla. It's not this, it's _that_.

I find it hard to read articles where the agentic writing is this obvious. It's a distraction from the message of the text, which I'm sure is worth my time. Is there no way to stop generated writing from sounding like this?

Re: AI Agents and the Refactoring That Never Happens

#47
post #36

>A computer can hold far more in “working memory” than a human can That's a bit of a straw man. State of the art agents are limited to ~3.8Mi (1M tokens). That's usually where I run into issues--an LLM can't possibly hold as much context as a human and it's more of an art than a science getting the most important things squeezed in. It's especially prudent for complex codebases/systems. An agent only knows what it ca…

That's why you make sure to put that institutional knowledge in AGENTS.md /s

Re: AI Agents and the Refactoring That Never Happens

#48

> Teams, em dash bla bla bla em dash have quietly bla bla bla. It's not this, it's _that_. I find it hard to read articles where the agentic writing is this obvious. It's a distraction from the message of the text, which I'm sure is worth my time. Is there no way to stop generated writing from sounding like this?

Why believe it's worth your time? Upfront it reads like:

> Claude, generate a 500 word blog post about how people don't refactor anymore because of AI.

Just send me the prompt!

Re: AI Agents and the Refactoring That Never Happens

#49
post #26

Earlier quoted context omitted.

All sorts of efforts that used to be put off indefinitely can now be handled largely by LLMs. Yesterday I took a codebase (~50 source files) and spawned a sub-agent (GLM 5.3 Flash) for every single file. Each file was analyzed for test coverage issues, inconsistencies between comments and implementations, and all call sites against the implementation. Then issues were aggregated. I reviewed the list manually, had Opu…

> then had a commit made for every minor issue found Interesting choice of words. Not a fix. Not a refactor. A commit.

Not sure what you’re getting at

Re: AI Agents and the Refactoring That Never Happens

#50
post #24

Let's say that tomorrow, due to an improved model or whatever, we realize that the most efficient form of code of an app - for an llm to understand and work with - is for it to be in one long spaghetti file. Why wouldn't we do that? I think there's a point where this comes down to values instead of facts. If you want it to be human readable, that's fine and there are a bunch of therefores from that point. But if you…

I'd argue the things that make a codebase more human-readable is also what makes it more agent-readable though. Agents are trained on human data, after all. The position in the article is reasonable because what would end up happening otherwise is: - Agents increase complexity, humans can't read it anymore - Agents increase complexity, agent can't read it's own code anymore - Agent unable to keep making updates witho…

So, basically, sure, but I disagree with the hypothetical in the first place
Post reply on HN