What works in a toy example doesn't necessarily scale / handle corner cases.
I tend to read along with the code it's writing and make suggestions when I see it's missing stuff, or I fill it in myself afterwards, depending. For one it can type out the annoying bits much faster than I can!
At the moment I do keep the general plan in my head myself though, and I thoroughly read anything it generates before I run it.