>Then I asked it to write unit tests for the code, and it confidently started writing correct-looking code that would take the same input and expect the correct output, but just stopped in the middle.
One of two things. First ask it to continue. Sometimes it just stops half way thru code foe whatever reason.
The other possibility is you filled up the token context window. Not much you can do but wait for the 32k model.
I asked it to continue twice after the first failure. Every time it failed in about the same point. Might've filled up some mysterious limit in the model.
I didn't really need the unit tests anyway, but I wanted to try if it could do it :)