Hey, it has been almost a year and this problem still persists in Max 7.2.5. It wouldn't be such an issue if crash recovery included the contents of [codebox].. but it doesn't. Everything gets wiped. I use Sublime for most of my coding so I usually have some portion of the lost code, but Gen is all about real-time compiling and seeing results while coding within the patcher - so it's easy to forget. Likewise cmd-click is how I lock and unlock backgrounds. It's very easy to accidentally cmd-click the border of a [codebox] in edit mode.
I submitted a bug report when I first noticed the issue. Some sort of official response would be great. I have lost many hours of work. Truth be told, I will keep using Gen even if the problem doesn't get fixed - and I will keep losing hours of work. But I'd rather not. Thanks for looking into it.