Remix.run Logo
▲ Show HN: Tmux-restore saves tmux windows and agent sessions across reboots(github.com)
22 points by boldi 4 days ago | 9 comments
▲boldi 3 days ago | parent | next [-]

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!

▲l9o 2 hours ago | parent [-]

Love it! I've been doing this manually when I need to restart my hosts :) Would it be possible to have instructions to install it that don't involve executing a script? Something as simple as the dependencies I need to install and the tmux config required would be super helpful.

▲hxugufjfjf an hour ago | parent | prev | next [-]

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

▲TeaVMFan 3 hours ago | parent | prev | next [-]

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

▲peterdemin 2 hours ago | parent | prev | next [-]

Does it restore active python venvs?

▲jauntywundrkind 2 hours ago | parent | prev | next [-]

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.

▲ShinyLeftPad 42 minutes ago | parent [-]

What are the risks?

▲jauntywundrkind 11 minutes ago | parent [-]

If there's anything sensisitve open on a tmux window somewhere it's just sitting in a file in your hard drive. It's overwritten every 10 minutes by whatever is there.

If that's a password for some reason, it could be captured.

I just thought it was going to be the sessions, window names, layouts. I wasn't expecting the content too. Not a big deal for me, but a surprise!

▲enoch_hou 2 hours ago | parent | prev [-]

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.