logoalt Hacker News

Show HN: Tmux-restore saves tmux windows and agent sessions across reboots

24 points • by boldi • last Tuesday at 5:25 PM • 11 comments • view on HN

Comments

boldi • last Tuesday at 7:45 PM

Hi everyone I built this since it'd be so frustrating to have all my tmux windows with different paths and layouts all destroyed when restarting my computer (e.g. for installing drivers). It also resumes e.g. claude code sessions. Hope it helps!

➕ show 1 reply
hxugufjfjf • today at 4:36 AM

I’m pretty sure I’ve used tmux-ressurect for this. What’s the difference?

_blk • today at 6:14 AM

Cool thanks, will give it a shot.

Does anyone know how this compares to herdr? I've been curious to try that I've too.

TeaVMFan • today at 3:05 AM

This sounds great! Might convince me to defect from GNU screen.

peterdemin • today at 3:20 AM

Does it restore active python venvs?

jauntywundrkind • today at 3:40 AM

After much delay I finally got tmux-continuum & tmux-resurrect going. Which I think are very well known plugins for this.

https://github.com/tmux-plugins/tmux-continuum https://github.com/tmux-plugins/tmux-resurrect

Also used tpm, the plugin manager. There's some variants. I went with ahiru-tpm which is pretty drop in compatible but not seeing much action, and tpm seems more active again. https://github.com/tmux-plugins/tpm https://github.com/x3rAx/ahiru-tpm

One of the weird cool (but also, wish I'd known, has risks!) things I wasn't expecting is that captures the screen buffer. The program is dead, but there it is, whatever was last there, when you reboot. Wild.

I've had some system instability some, alas (blast you ram crunch), and did everything under the sun to build tools to capture my workspace. This, this was way way easier.

➕ show 1 reply
enoch_hou • today at 3:51 AM

This is exactly the pain point for me — losing a whole tmux layout after a reboot is annoying, but losing the agent sessions running in those windows is worse. tmux-resurrect never quite got the agent part right for me, so I'm curious to try this and see how it handles restoring those sessions.