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…
AI Agents and the Refactoring That Never Happens
51–60 of 76 posts
Re: AI Agents and the Refactoring That Never Happens
#52I 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 agree with the other reply that you're likely to get better results if it has some kind of test case to run that's more authoritative than its own reasoning.
Re: AI Agents and the Refactoring That Never Happens
#53Re: AI Agents and the Refactoring That Never Happens
#54I 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…
Re: AI Agents and the Refactoring That Never Happens
#55Meanwhile 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…
Re: AI Agents and the Refactoring That Never Happens
#56> AI agents don’t get lost Thats… not my experience. Like, not at all. They very regularly get lost
Same. Also this article reads like it was written by Sonnet.
Re: AI Agents and the Refactoring That Never Happens
#57Earlier quoted context omitted.
Same. Also this article reads like it was written by Sonnet.
I think I used Opus actually. But my prompt was huge, basically the article content. I told Opus what I wanted to approach in the article with all the relevant details I wanted to include and it created the article. Then I reviewed it.
Re: AI Agents and the Refactoring That Never Happens
#58> Here’s the problem. AI agents are not bound by human context limits in the same way. An agent can read the tangled function, trace every caller, and make sense of the mess that would have stopped a human cold. It can add the next branch correctly, and the one after that, working confidently inside code that no human on the team fully understands anymore. They're not bound by the same limits but they're still bound…
Re: AI Agents and the Refactoring That Never Happens
#59> 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!
---
Human contexts are way more limited compared to computers. We can't reason about complex software when they go through many branches with so many implications. It's just too hard for humans to keep track of all interconnected pieces. So humans have historically split the system parts into manageable modules that can be understood in isolation and then we spend some time connecting those parts. That's how we can keep the context reasonable for human understanding.
So, when senior engineers found themselves lost while trying to debug an issue in a complex system they would naturally decide to pause and rewrite or refactoring the confusing piece of the system to make it manageable so developers can easily understand what's going on and review future changes.
Usually a system doesn't start that confusing. But as requirements change developers add additional branches and code until the code is no longer manageable. Sometimes the requirements changed significantly since the code was first written and all we have in the code are exceptions rather than the rule. That's usually when historically senior developers would take the time to rewrite that part of the system so they can reason about it.
But AI agents are not as limited as humans context-wise and they can reason about those confusing (to humans) systems and make sense of it. So they simply keep adding additional branches to the existing mess without ever suggesting a major refactoring like a senior developer would do in those cases, unless there's specific harness to tell agents to act like that.
This article is about bringing this into attention so that developers can policy themselves and keep asking themselves whether it's time for a major refactoring instead of relying on the AI agents and trust them because they no longer understand the code because it's too complex for humans to follow. Can you draft an article focused on this concern?
Re: AI Agents and the Refactoring That Never Happens
#60I find the basic premise for low level code quality to be true, in my experience, but counterintuitively I can now police the overall structure and system architecture MUCH more heavily. As ever, no one is willing to allocate time for this, but (with unlimited work tokens) I can parallel path massive cleanup refactors all the time now.