It is weird. I've had maintainable solutions on non-trivial code, but it does kind of require babysitting. Planning documents and detailed specs help. You get a feel for where the agent will want to take a shortcut and can devise ways to navigate around that.
I also find Go works really well, and generally stays, if not exceptional, than at least maintainable.
I've also enjoyed using OCaml, but I will say that I found the single worst function I've ever seen in a codebase in vibecoded OCAML.
You might just try asking - "hey I'm having trouble keeping maintainable codebases - how can I structure this project in a way where the code will be stable long term".
Sometimes getting the "software architect" role into the agent context is all it takes.
I also find Go works really well, and generally stays, if not exceptional, than at least maintainable.
I've also enjoyed using OCaml, but I will say that I found the single worst function I've ever seen in a codebase in vibecoded OCAML.
You might just try asking - "hey I'm having trouble keeping maintainable codebases - how can I structure this project in a way where the code will be stable long term".
Sometimes getting the "software architect" role into the agent context is all it takes.