# Rex can now resume your programs through a server restart

> Source: <https://twitter.com/mitchellh/status/2125713695233970521>
> Published: 2026-11-26 07:20:23+00:00

**Key takeaway:** Any program can opt into restart-resume by emitting the OSC 7577 escape sequence, with no terminal-specific integration; Rex gates it per program via Lua config on name, path, working directory and flags.

Rex can now resume your programs through a server restart! This is based on a brand new terminal protocol we're also publishing today (OSC 7577) that we worked on in collaboration with @herdrdev with review from multiple terminal emulator and terminal program authors. Link: superlogical.com/rex/docs/build…
This means that ANY program can restart, not just agentic coding tools, and it doesn't require any special integration with any specific terminal or out-of-band protocol. It's plain old terminal escape sequences that are easily implemented by any program!
Rex is shipping with built-in support for Claude Code to start (we emit OSC 7577 in a session start hook), but hope that other programs will adopt this and enable restart.
Program restart in terminals is fundamentally unsafe, so a lot of effort was put into making this as safe as possible. Ultimately, the security of this lies in the terminal emulator.
For Rex, we have a highly flexible Lua-based configuration to opt-in to resume on a program-by-program basis. You can filter by program name, path, working directory, command-line flags, and more. You can also disable the whole thing with one line.
