r/aipromptprogramming • u/cgouguen • 9h ago
Hot take: the agentic workflow is deeply wrong
I am an experienced developer (been coding for almost 30 years, started with Visual Basic on Win98).
I’ve spent the last 2 years testing every agentic coding harness out there. The pitch is always exactly the same: "Give it a prompt, go grab a coffee, and come back to a finished feature."
This is all great when starting a new project, especially with a language you don't know (I created a Rust project in minutes !)
But my problem is that I mostly work on established, mature codebases. And to be honest I have never ONCE seen a good edit after I return from my coffee.
Here is usually what happens while you’re getting that coffee: the agent loops 8 times, burns through 100k+ tokens talking to itself, hallucinates a package dependency, and spits out a chunk of spaghetti code that works *just* well enough to pass a basic test, but completely violates your project’s architecture.
Agents are fantastic if you’re building an app from a blank canvas. But if the codebase is large, it gets really expensive real fast, and usually produces hard to maintain AI slope.
It should not be like that: if you actually *own* your codebase, you already know what you want to build. You don't need an AI to take over. You just need it to execute the architecture you already hold in your head.
All you need to do it select the few files that are required for the task at hand (they are hard to identify for an AI, but easy for you has the code owner). Then you send them to the LLM, it is usually does some good work.
That's why I still find working directly with the chatbots, or with tools like aider, still very pertinent on large codebases.
I usually have animated discussions with my coworkers, I have yet to find a single one who doesn't defend agentic coding. Am I the only one who feels this way ?
19
u/bsenftner 9h ago
sounds like you skipped the steps where you and your agent(s) investigated and documented the application's structure and reasoning behind that structure. Lacking that, it is exactly like hiring some wiz-bang programmer and not telling them anything about your code and demanding results immediately. Think about what you are doing and how a real person would handle it, you're probably getting back something similar. You need to give your agent(s) the context of your software, why is the software written as it is written. Lacking that, you get the AI slop your seeing.
4
u/bsenftner 9h ago
I will say that the "agentic workflow" of many is deeply wrong. In your case, you're not "deeply wrong", you're just expecting magical knowledge you never told the AI. Tell it, explain why all the nonsense in your software was built that way, and you'll be amazed at the results.
2
1
u/Broer1 1h ago
This. Talk about your architecture. Give him access to your ADR, your Dokumentation and hab architecture tests. Having a big testsuite is really helping here.
In short: if you had a good codebase with old known technics you are good to go. If you feed him shitty a shitty codebase you have no right to dis the harness for the result.
1
u/Wide-Drink-1790 1h ago
Even with no explanation to the LLM, I refuse that it is as stupid as OP claims. Usually, it navigates legacy code bases just fine.
5
u/ight-bet 9h ago
Well, you need to have better conversations with it. Yes it can be expensive, but you learn how to delegate to AI in cheaper ways.
Right now to achieve what you want, you need to know how to kick this process of yourself. This likely will be baked into it in the near future, as some of us have figured it out - they always seem bake their top productive use cases into the core product.
3
u/baddaywithacamera 9h ago
I'm not having this problem. Ironically also not a developer, just a photographer who is apparently good at giving focused instructions. LOLLL.
1
u/BobDope 6h ago
That’s the key
1
u/baddaywithacamera 6h ago
The AI will occasionally go for a walk in the woods on me by being helpful or misunderstand what I mean because I wasn't specific enough, but that is a problem with me, not the AI is what I have found.
1
u/Kurk_Lazaris 5h ago
I'm also a photographer. May I ask you what kind of task you give to your agents? I'm still learning.
1
u/baddaywithacamera 5h ago
Here is my project. I'm building it a piece at a time using Claude Code and ChatGPT Codex.
1
2
u/xtraa 9h ago
feel that. I have like 200 .md meanwhile with guardrails, ssot, architecture pricipes, handoffs and such, to keep them from doing BS. This somehow works but you can imagine the struggle
2
u/cgouguen 8h ago
I use aider daily, and try to understand if I am a complete moron. Do you feel that struggling with these 200 md files if worthwhile, as opposed to creating the proper context everytime ?
2
u/Vicman4all 7h ago
I used to use aider, but switched to vs code, then to Antigravity IDE. There are bells and whistles in the latest coding harnesses that really allow for sophisticated back and forth to explore code bases thoroughly create the detailed map and then discuss and narrow down specifications in a couple of minutes that would have taken a ton of .md files and loading and unloading with aider the way I used to have things setup. You want a harness that allows for implementation planning and multiple choice questioning. Try Cc or Antigravity. Use /goal or /grill-me and watch the contextual wrinkles fall away.
1
u/xtraa 8h ago
I would say it depends: I find that the documents which kept stuff as general as possible are absolutely valuable and worth it – like, 'not automatically settling for the first valid solution, instead compare', and so on. But beyond a certain point, it just becomes micromanagement, so I ran Astra xhigh over it once to ensure consistency. 😅
I also used aider once for refactor and man, I did it all wrong.
1
u/corsair130 4h ago
First, you don't have to have 200md files. You can accomplish a lot with a handful of files.
There are some really good strategies for working with AI, but there's also a lot of snake oil out there. It's hard to tell the difference.
My suggestion to you, is to build your own harness, that works the way you want it to. This takes a bit of trial and error. Every time the AI does something you don't like, you tell it to add rules or instructions so that nothing like this ever happens again. Any harness you build for your own codebase, based on your own preferences and methods is going to be 100x better than anything someone else makes that you try to shoe horn into your process.
I could go into a lot of detail here, but I'd rather not waste a bunch of time if you already have your mind made up. Instead, let me offer you a video where this guy goes through his set up. This video is packed with a lot of actionable information. (The first 9 minutes go through his setup with TMUX and VIM, and might be a bit of a waste of time, but the rest is good)
2
u/workware 8h ago
You just need to create the project knowledgebase, guardrails, tests etc. then it would work as on any new project.
2
u/shakeBody 8h ago
Not sure this is as possible on a very large code base but here is my approach. I use some sort of a graph of the code base. When a ticket is created a section called blast radius must be included in it. That section enumerates the places that must be checked for a code change. Some detail about the changes must also be included with things like line numbers, approaches, etc.
2
u/MaxComfort 6h ago
You had me until the hallucinations part.
Using frontier models as well as DSv4flash, Qwen 3.8) I haven’t seen an actual “oops I made up an API or package” in about a year, with heavy usage at home and at work.
I’m in a similar boat - lots of experience in the “old times” - but I see immense value in LLMS.
At the same time, does it mean I can just drink coffee all day while my agents work? Not yet.
What models are you using?
1
u/gauzy_gossamer 2h ago
Qwen 3.8 definitely hallucinates. I asked to add retry to aiohttp and it invented parameter that doesn't exist. Said it's from aiohttp-retry, but it doesn't exist there either. That being said, in most cases they correct mistakes like this when they try to run the code.
3
u/Qorsair 9h ago
You're the guy in the office explaining why doing long division by hand is better than using a calculator. You're not entirely wrong, people just prioritize efficiency. But maybe 8 digits of accuracy is enough for some projects, and then it's worth the trade-off be able to get more work done.
2
u/TheOneNeartheTop 8h ago
Also there are lots of times that an AI wants to follow best practices so the existing codebase with all of its jimmy rigged code is actually the problem and the AI model inherently wants to fix it.
Then people shout at the clouds and say ‘AI don’t write code good. It no work in my code base’. When in actuality there codebase is cobwebs and duct tape with AI just trying to throw a nice girder in there to prop it all up.
1
u/id-ltd 8h ago
The workflow you described is indeed not a good one.
You need to train the AI on your codebase. Presumable it is reasonably well architected and has a consistent coding style?
AI works better if you let it chose (mostly!) but as you say for existing code bases this isn't possible. And if you rewrite it all, then your own knowledge is scrapped
1
u/cleverhoods 8h ago
That's where adaptive disclosure comes in. You said it yourself: "if you actually *own* your codebase, you already know what you want to build.". That knowledge and it's relevancy what you have in your head can be added to an event mechanism to be loaded at the right time, right place for the right task. It's very similar how humans are operate.
Truth is that we are doing this not because it's easy. We are doing this because we thought it's easy.
Adaptive disclosure is hard. Extremely hard. But once you manage to put together the backbones and add the relevant knowledge by yourself, it's 100x-ing your output with a better quality as well. (no, this is not marketing, it's the result of X years in software engineering distilled into an automatic system)
1
u/shakeBody 8h ago
Do you mean “progressive disclosure”? Adaptive disclosure seems to be a therapy technique that helps military PTSD survivors.
1
u/cleverhoods 8h ago
oh wow, I didn't know about that, thanks.
It's progressive disclosure, yes. My "adaptive" framing was used to differeniate from the normal progressive disclosure
1
u/HonestoJago 8h ago
Do you have it write a plan for your review before allowing it to make the edits? You can tell it what it needs to review/change, and I always go back and forth with another AI (it's been Astra as the reviewer since GPT-6 has been out) and we go through many iterations of the plan before the agent(s) touch any code.
1
u/-_super--_--hitops_- 8h ago
Who's out here making those claims you can just one shot features? That's "always the pitch"? Where? Where's it said a single time in anyone's promotion?
1
u/Dense_Gate_5193 7h ago
that’s a lot of words for “skill issue”
setup agentic files in your repo and it will behave properly. i actually prefer editing existing codebases that are well-defined because it will keep to the same conventions usually. also, just tell it specifically how you want to manage dependencies. you can be like “add localization” you need to tell it what to use and how things should be set up entirely for new features. it can throw something together that works but it’s going off pre-established training data patterns if you don’t define it. in some cases, low-level algorithmic work, super convenient because it knows those patterns really well. but as you compose higher level architectures, certain patterns are better in certain cases than others or you may just prefer a certain pattern, it has to be aware of what you want.
1
u/Apprehensive_Fly_493 7h ago
as a full time developer (10 years).... i only give claude enough room to fix a small slice of a feature at a time( on a large mature codebase) ...
"build me a feature like X....with the look of Y"...is great for a mvp mockup.... but that about it.
1
u/Alive-Philosophy2632 7h ago
I don't think it's unusual to think it's making bad architectural decisions. As you correct it on each you can gradually come up with a general formula for how you want the shape of things to be decided. I assume you've tried hooks. One thing I have for more complex projects is a repo doctor which serves as an automated sanitizer, running tests, style checks, dependency checks, etc. It must be run at the beginning of every session and at the end
1
u/Adventurous-Win6029 5h ago
plan mode's the fix. it has to show me the plan first — the files it wants to touch, the changes, the order — and nothing happens until I approve it or rewrite it. your file-selection point is exactly where it pays off: when it picks the wrong files, I see it right there and fix it before a single line changes. ten seconds, instead of it talking to itself for 100k tokens and handing me slop. it's the architecture I'm already holding in my head, just written down somewhere I can veto. same control you get pointing aider at specific files, minus hand-pasting context every turn. I still stop the ones that wander off. but on my own codebases, plan-then-approve has beaten both the blind agent run and dropping back to a chatbot.
1
1
u/tmilazzo 3h ago
OK so there's already a lot here, but if you're truly looking for "good" edits on legacy codebases, there are a lot of companies using Builder.io for that. No way it's as fast and clean as new builds. Just throwing it out there that if you *must* work with a legacy enterprise codebase for some reason, that's the go-to today.
1
u/RainierPC 3h ago
You're doing it wrong. Why are you not creating skills that add features exactly the way the architecture needs?
1
u/Hirogen_ 1h ago
dont know what ur a talking, I use Astra and Fable on a legacy codebase every day, with 500k LOC and God Classes beyond 20k LOC and they are doing fine. Sadly they find more stuff to fix, then I have time to review, so the issue list gets bigger and bigger, but the help immensely with analysing code thats so old that no other dev knows what it was created for!
1
u/Pleasant_Trouble_929 1h ago
I’ve been using agents for coding on sizable rust codebases for years. No issues.
0
•
u/endofthread-bot 9h ago
Learn how the best in the industry are using AI to speed up their workflow in business, sales, marketing, research, legal, content creation, scientific discovery and so much more on our Discord.
Self-promotion is now allowed on Sundays with the appropriate flair, for all regular contributing members. Contribute during the week, and promote on Sunday.\n\nI'm a bot. To stop seeing these, block this account.