Video wird geladen...
Video konnte nicht geladen werden
cmux now restores your Claude Code, Codex, and OpenCode sessions across quits and reboots. Run `cmux hooks setup` once. Requires v0.64.3.
55,605 Aufrufe • vor 5 Monaten •via X (Twitter)
39 Kommentare

Great work! Been doing this in vsmux and zmux for weeks now. It doesn't need hooks btw, see how I did it here: (native Ghostty fork) and /vsmux (vscode extension)

Free & open source (GPL). GitHub:

Session restoration across reboots is the kind of thing you don't know you need until you've lost a long context three times in a row.

FINALLY

How do I drag in an image? Doesn’t work anymore in the new update… @lawrencecchen

sry we'll fix in a minor patch. will be "shift" to drop as text (into claude code/codex) so should match behavior of dragging files into text buffers in vscode

Thanks Lawrence.

Big one for me is the overnight runs. I'll kick off a long agent task before bed, mac decides to reboot for an update, morning comes and the whole thing's dead. Hooks like this fix the silent failure mode no one talks about. Installing today.

does it eat up the context - usage limit? i mean imagine you open cmux and all sessions have been restored, and you finish your 5h usage limit

@warpdotdev when will we have this ?

We’ve been doing this at for quite a while now : restoring Claude sessions, tabs, active terminals, and more. ➡️ Give it a try: 🔥

Is this possible in tmux?

session restore is underrated. once agents run across days, the hard part becomes less “can it code?” and more “can I reopen the exact run, inspect decisions, and continue without rebuilding context?”

A whole CLI for --continue ? XD

session restore is underrated. the difference between toy agent and daily driver is whether it survives quit/reboot/context reset without losing intent. next layer I’d want is searchable history of decisions + tool calls, not just terminal state.

Hey man Great work. I'm diving through docs of cmux, but I can't find one thing Hook that I can customise same way as in tmux, which is triggered when workspace in cmux is changed. Tmux does it this way in .tmux.conf set-hook -g client-session-changed 'run-shell "~/.local/scripts/tmux-on-session-switch.sh #{session_name}"' Is this possible in cmux?

Revolutionary!

Been waiting for this capability, would also be useful to reinstate pills as well.

This is hot.

i built a terminal for this too. do not need hooks. supports hermes, claude, codex and opencode.

I'm literally implementing this right now with systemd+tmux+codex lol

pi

This is the stuff that makes agent workflows feel less fragile. Losing the terminal is fine, losing the run context sucks.

incredible

Nice. 👌

Have you fixed the @ symbol issue for non english keyboards... that would be amazing!

cmux hooks setup is the sharp part here. For Claude Code/Codex/OpenCode, does restore cover only the session process, or also terminal cwd/env after quits and reboots?

Session restore is one of those boring features that becomes huge once agents are real work, not demos. The failure mode is rarely the terminal closing. It is losing the reasoning trail, pending approvals, and enough context to safely resume without starting over.

does it support restoring state for ssh reconnections?

Why no Linux? Sir plz

this is it !

Not support ssh... a little bit disappointed

good point we will fix

thanks!

If you add the communication system I have in this I'd use it!

This is great

Ty ty

@manaflowai Cannot imagine you just support this. It is good. I used to manually do that for every update

Session restore sounds small until you live inside the run. A reboot should be an interruption, not amnesia. If an agent cannot survive process death, it is still a demo wearing a systems coat.


