I do the same thing with terminal tabs, is there a program out there that remembers the working directory and history of the terminal tabs that are open, then after closing reinstates it all when opened? This doesn't seem like it would be too hard to do.
Kind of like a tabbed browser that remembers history and open pages, but for terminals.
(1) screen will do a lot of that. But if the system has been restarted, live processes in the terminals will no longer exist.
(2) You have the option of a suspend-to-disk, which can 'wake' you back to the right place.
(3) You could use an OS running in a VM, and suspend that. This is arguably the cleanest solution right now.
(4) You could get really in to process checkpoint/restore stuff in the kernel which seems to be constantly under development to facilitate live process migrations across machines in data centers.
Actually though, in all cases you will lose your network connections, which might be critical to the processes as well. Perhaps re-evaluate your workflow.
I use iTerm on Mac and it has a setting you can enable that remembers tabs and even opens new tabs to the current directory of your current tab. When I restart my computer, the tabs and command history for each are preserved, but the output display is lost.
Kind of like a tabbed browser that remembers history and open pages, but for terminals.