You really need to keep them on a tight leash, stop and correct them when they start screwing up, and then the remaining 90% of the work starts after they say their done, where you need to review/refactor/replace a lot of what they produced.
The only way you're going to let an agent go off on its own to one-shot a patch is if your quality bar is merely "the code works."