This is an important point. I hope they'll address this soon. I've just started tinkering with Code and took it for granted that I wouldn't lose the "conversation" when the terminal restarted.
Maybe just ask it to save off the contents of the session as it goes?
I've found it useful to have Claude Code basically take notes in a Markdown file as it's working. When needed, edit this manually + other context and feed it into a new session. This has been fairly useful for longer-running work.