Ghostty’s creator built a terminal that keeps AI coding agents running after you disconnect
Superlogical, whose founders include HashiCorp co-founder and Ghostty creator Mitchell Hashimoto, opened Rex to the public on Thursday after two months of beta testing and nearly 140,000 early-access signups.
The free, self-hostable terminal combines a native frontend built around libghostty with a multiplexer backend that lets developers disconnect from a remote machine or switch between devices, including an iPhone, without interrupting active coding agents.
Rex gives coding agents programmatic access to terminal sessions so they can execute commands in separate panes and use the results without interrupting their primary workflow. Superlogical says tens of thousands of people already use Rex daily.
Superlogical says tens of thousands of people already use Rex daily. The New Stack reached out to the Rex team for comment but had not received a response at the time of publication.
Agents take the terminal
Rex brings these capabilities into a native terminal application with a CLI and server API. An agent skill compatible with Claude Code, Codex, OpenCode, and Pi gives agents instructions for using Rex commands.
Superlogical demonstrates how an agent can run a test suite in a separate pane and retrieve failures from the output.
rex run --label tests --split=below -- make test
rex wait tests; echo $?
rex capture -b tests | grep -- '--- FAIL'
Developers can also use Lua scripts to respond to process exits or changes in program status without repeatedly polling sessions. A primary agent could use these capabilities to coordinate other agents outside a single coding harness, although developers would still need to implement the orchestration logic themselves.
When agents need you
A developer running half a dozen coding agents may have no reason to examine five of them but need to respond immediately to the sixth. Rex addresses this through its Activity Mode and an open specification called the Program Status Protocol, which allows programs to communicate their current state to the terminal using the OSC 7501 escape sequence.
The open source terminal runtime Herdr Core already implements OSC 7501, giving developers a common protocol for monitoring program state independently of the coding harness.
Surviving a server restart
Rex separates the terminal interface from the server that executes programs and maintains session history. Closing a client application does not terminate the processes running on the server.
Closing a client application does not terminate the processes running on the server. Developers can reconnect from another device and access the same running sessions.
Recovering from a server restart, however, is more complicated. Superlogical’s Program Resume Protocol lets applications report the command needed to reconstruct their sessions after a restart, subject to configurable trust rules.
Rex installs a hook to restore Claude Code sessions after a server restart but does not preserve manually exported environment variables. Automatic recovery of unattended workflows depends on the agent’s integration with Rex. Codex and OpenCode do not yet report the information required for automatic restoration.
Without a matching detection rule, Rex restores only the shell and its working directory.
The security trade-off
Giving agents access to other terminal sessions raises security concerns in environments with tightly controlled permissions. Superlogical says Rex does not collect usage analytics or terminal contents, requires no account, and can run entirely on infrastructure controlled by the developer.
Superlogical says Rex does not collect usage analytics or terminal contents, requires no account, and can run entirely on infrastructure controlled by the developer. The application itself, however, is not open source.
According to the company’s remote access documentation, Rex currently relies on the connection mechanism to establish a caller’s identity. A more comprehensive authentication and authorization system is planned. The company recommends SSH for remote connections, allowing developers to use their existing credentials without exposing an additional network listener.
Rex also provides configurable trust rules that determine which programs can restart automatically, the directories in which they can run, and which command-line arguments can be retained. According to the Session Restore documentation, resume commands and their retained arguments are stored in plain text with restricted file access on supported Unix-based systems. Superlogical plans to introduce encryption where key storage is available.
Beyond the terminal
“The Rex Server has no concept of a terminal,” Hashimoto writes on Hacker News, suggesting that the architecture could accommodate applications beyond command-line tools. “I suspect in less than 12 months we’re going to see Rex screenshots with zero terminals,” he writes.
Hashimoto identifies enterprise access management and on-demand remote computing resources as potential commercial opportunities, although Superlogical has not formally announced its business model.
Native clients are available for Apple devices, with a Windows client expected in early 2027 and a Linux client planned. Rex already supports servers on Linux, Windows, and FreeBSD.
Comments
No comments yet. Start the discussion.