I get the impression that your takeaway is not to use LLMs, but I think your takeaway should be to give them more oversight. The way you describe this, it sounds like you went pure vibe coding.
> I asked the LLM to refactor for redundancy, quality, and size.
What did you expect when you asked it to make it smaller?
I’ve had good success with LLM refactoring. But the refactoring has never been “go make this better and smaller”. It’s “go do this specific thing to reduce redundancy” or maybe “give me a list of ways to improve the code redundancy” and then iterate with the LLM to improve the ideas and execute on the right ones.
I don’t think you can just vibe code your way out of a vibe coded mess.
No, my takeaway is the same as with working with any other developer.
If I take responsibility for the product, then I can't afford to accept sub-standard input; no matter the source. My main mistake was not immediately putting the kibosh on the LLM, as soon as it started thrashing. Instead, I played along, for waaaayyyy too long.
The request for refactoring was actually a fairly long and detailed prompt. I can't recall it exactly, but by that time, the context was well and truly poisoned. The LLM had decided that its way was best, and could not be persuaded, otherwise.
The same goes for humans, in a similar situation. I've encountered almost the exact same behavior, many times.
I am quite aware that my personal standards tend to be a lot tougher than what seems to be the norm, these days, so I am willing to admit that I may be demanding too much, but that's how I was trained.
But I have been making extensive use of LLMs, for the last few months, and they have been incredibly helpful. The Rubicon has been crossed. There's no going back, but I also need to make sure that I don't get drunk on Kool-Aid. LLMs are still very much a WiP.