Rex: Mitchell Hashimoto's New Terminal Built for AI Coding Agents
Rex is a persistent terminal and multiplexer from Ghostty's creator, built with a CLI and protocol designed for coding agents like Claude Code.

What is Rex?
Rex is a new terminal application from Superlogical, a company founded by Mitchell Hashimoto, the developer behind Ghostty, Vagrant, and Terraform. It combines a terminal emulator and a multiplexer (the kind of job tmux usually handles) into a single native app, and it’s built around a background server that keeps your shells and processes running even when you close the window. Rex is currently in an invite-only beta for macOS.
TL;DR
- Rex separates the app from the session: a background server owns your shells and processes, so closing or quitting the Rex app doesn’t kill what’s running inside it, and reopening it reattaches you where you left off.
- It shares code with Ghostty but is a different product: Rex is built on Libghostty, the same MIT-licensed rendering and terminal emulation library that powers Ghostty, but Ghostty itself remains an unchanged nonprofit project.
- The CLI is the standout feature: commands like
rex ls,rex split,rex send,rex capture, andrex run --waitlet you script and control terminal sessions, with JSON output on most commands for automation. - Rex has no built-in AI assistant, and that’s intentional. Instead it exposes a small status protocol (OSC 7501) so agents like Claude Code can report whether they’re idle, working, blocked, or done.
- A one-time
rex skill setupcommand installs integration hooks for supported coding agents (Claude Code, Codex, OpenCode, and Pi), letting an agent open diffs, run tests, or start dev servers in new panes through the CLI. - Remote access is built in via Tailscale, off by default, letting you reach Rex sessions on other machines, though both ends need Rex installed, so it doesn’t replace SSH outright.
- It’s free during beta with no account required, though licensing and long-term pricing haven’t been officially announced.
Without shadow IT.
How does Rex’s persistent session architecture work?
The core idea behind Rex is splitting the terminal UI from the processes it displays. A background server owns all your shells, and the Rex app itself is just a client that connects to that server. Quit the app, and your long-running build, dev server, or agent session keeps executing in the background. Reopen Rex, and it reattaches to the same state.
Rex uses specific terminology throughout its CLI and docs. A session is roughly a project. Inside a session, windows are what most terminals call tabs. Inside a window, blocks are panes. Right now a block is strictly a terminal pane, not a per-command output block like in Warp, so don’t confuse Rex’s “block” with that pattern.
This architecture matters most for anyone who has lost a long-running job because they accidentally closed a terminal window. It’s also worth noting that persistence survives an app quit, but not necessarily a full machine reboot, since a restart still kills the underlying processes the server was managing.
What does the Rex CLI actually let you do?
The CLI is arguably the most developed part of Rex. It ships as a rex command available inside every Rex terminal, and it can drive almost the entire app without touching the GUI. Some of the commands demonstrated include:
rex lsto list active sessionsrex newto create a fresh sessionrex splitwith a--split=rightflag and ratio to open a new pane next to the current onerex sendto type text into any terminal pane, andrex send-keyto send keypresses like Enterrex captureto print the full contents and scrollback of a pane as plain text, or as HTML with colors preserved using--format=htmlrex run --waitto launch a command in a new tab, block until it finishes, and return its exit coderex events --jsonto stream everything happening on the serverrex doto run actions or Lua scripts
Most commands support a --json flag, which makes the whole terminal scriptable. A split pane with a running command can execute in roughly a tenth of a second, and the run --wait pattern means you can treat terminal commands like proper jobs with exit codes, useful for scripts, CI-style checks, or orchestration from another program.
How does Rex integrate with coding agents like Claude Code?
Rex doesn’t bundle its own AI chat assistant. Instead, it defines a small protocol, OSC 7501, that lets any program running inside a Rex pane report its own status: idle, working, done, blocked, or errored. If blocked, the program can further specify whether it’s waiting on a permission, a question, or a login.
Claude Code already reports this status, so Rex can surface at a glance which of your open sessions actually need your attention instead of requiring you to click through every tab. You can read this state yourself too, either by streaming rex events or querying a specific pane with rex block call program-status.
● Reading src/server.ts
● Editing 3 files
+ import { limit } from 'rate'
- app.use(cors())
✓ Tests passed · ready for PR
To wire an agent into Rex, you run rex skill setup once. That installs a skill into supported agents and a start hook for agents that support hooks. Supported agents include Claude Code, Codex, OpenCode, and Pi. Once set up, an agent knows which Rex session and pane it’s operating in, and it can use the CLI to open a diff in a new tab, start a dev server in a split pane, run tests, and read the results back, all without leaving its own context.
Is Rex worth using instead of tmux or iTerm right now?
For a coding-agent-heavy workflow, Rex is genuinely interesting: persistent sessions plus a scriptable CLI plus agent status reporting is a combination few terminals offer out of the box. The app feels fast because it owns both the terminal rendering and the multiplexing layer natively, avoiding the layered overhead of running tmux inside another terminal.
That said, there are real gaps. Rex is macOS-only for the app itself (though the server also runs on Linux and Windows, with early clients in development). It’s invite-only beta software, meaning commands and behavior can change. If you’re coming from tmux, nothing carries over: your .tmux.conf isn’t ported, there’s no built-in copy mode yet, and some tmux options are simply missing. Remote functionality still has rough edges too; hosts added from the CLI don’t yet show up in the app’s UI.
It’s also not clear whether Rex itself will be open source. Superlogical has said it’s building on Libghostty and may release open source pieces, but nothing has been said about Rex’s own license. For a tool meant to become a daily driver, that’s worth watching before committing a full workflow to it.
What should you do if you get access to Rex?
A reasonable approach is to run Rex alongside your existing terminal rather than replacing it outright. Use it specifically for agent sessions, where the persistence and status reporting provide real value, and keep your current setup (Ghostty, iTerm, or tmux) for everything else until Rex’s licensing, pricing, and feature set stabilize out of beta.
Frequently Asked Questions
Is Rex the same thing as Ghostty?
No. Ghostty is a separate nonprofit terminal emulator project and isn’t changing. Rex is a new commercial product from Superlogical that uses Libghostty, the same underlying library for rendering and terminal emulation, but it’s a distinct application with its own multiplexer and CLI.
Does Rex include a built-in AI assistant?
No. Rex deliberately doesn’t ship a chat-based AI assistant. Instead, it provides a status protocol and CLI that external coding agents, such as Claude Code, Codex, OpenCode, and Pi, can use to report their state and control the terminal.
Can I use Rex to replace tmux?
Rex functions as a terminal and multiplexer in one, similar in spirit to tmux, but it doesn’t import tmux configuration files, lacks a built-in copy mode as of the current beta, and is missing some tmux options. Tmux users should expect to rebuild their setup rather than migrate it directly.
Is Rex free to use?
During the beta it’s free with no account required. Reports suggest it may stay free with monetization details announced before a stable release, but this isn’t officially confirmed, so treat any pricing claims as unsettled for now.
Does Rex work on Windows or Linux?
The Rex app itself is currently macOS-only. The underlying server component also runs on Linux and Windows, and early clients for other platforms are reportedly in development, but there’s no general-availability client outside macOS yet.





