- More Lua fixes for init.lua and
rex do. We fixed another set of places where our Lua interpreter gave a different answer than Lua 5.1, and Lua-heavy loops now run about 15% faster. tonumber now reads numbers such as "1e2", "-0x10", "0x1.8" and " 10\r" instead of returning nil, returns nil for strings Lua refuses such as "0x-10" and "1_0.5", and tonumber("10", 37) raises "base out of range".- Arithmetic, library arguments and
string.format now read numbers the way tonumber does, so "010" + 0 is 10 instead of 8 and "0b11" or "inf" are no longer numbers. - Numeric
for loops accept numbers in strings, such as for i = "1", "3", hex literals such as 0x1p4 and 0x1.8 now load, and a malformed literal such as 0x1p fails with "malformed number" instead of loading as NaN. - Library functions now accept a string that holds a number, such as
("hello"):sub("2"), table.insert(t, "1", v) and select("2", ...), and string.format("%x", "255") gives "ff". h:kill(9) on a rex.exec.start handle now sends SIGKILL instead of raising "string expected, got number".math.huge is now infinity, and infinity and NaN print as "inf", "-inf" and "nan" instead of "+Inf" and "NaN".math.huge still means no limit for rex.wait, rex.after, rex.sleep and the rex.exec timeouts, but rex.json.encode, rex.set and API calls now refuse it because JSON can't hold infinity.s:byte() and s:byte(i, nil) now return one byte instead of every byte to the end, s:byte(0, 2) returns bytes instead of nothing, and a range of 100,000 bytes takes 1 ms instead of 520 ms.string.gsub now raises "invalid replacement value" when a replacement table or function returns something other than a string, number, false or nil, where it used to drop the match silently, and it accepts a number as the replacement.table.concat now uses its range as given: i greater than j returns "", a range with a missing item raises an error, and a number works as the separator.string.find and string.match with a start past the end no longer crash or match the wrong place, a failed string.match returns one nil, a leading ^ in string.gmatch is an ordinary character, and the %f frontier pattern works.- Resuming a coroutine with fewer values than
coroutine.yield() expects, or one that ends with return coroutine.yield(), no longer crashes with a nil pointer error. - A coroutine made from a built-in function such as
select now ends and returns its results, and a coroutine.wrap coroutine that fails is now dead instead of stuck running. - Passing nil for an optional argument of
file:seek, io.open, io.input or io.output now uses the default instead of raising an error. - Lua fixes for init.lua and
rex do. We've forked our Lua interpreter dependency and fixed a set of bugs where correct Lua gave wrong results or crashed. We've also improved performance, but more to come. os.exit in init.lua now raises an error instead of stopping the server for every client, and in rex do it ends the script the way rex.stop does.- In init.lua,
dofile(), loadfile(), io.read, io.lines() and io.stdin:read without a file name now raise an error instead of reading nothing or hanging the server. In rex do they still read your stdin. - Closing
io.stdout, io.stderr or io.stdin now returns nil and "cannot close standard file" instead of breaking the output of the server or rex do. - Assignments with more than one target, such as
a, b = b, a or a, b = b, a + b, now give the right values. u, c = u:sub(1, -2), c - 1 no longer crashes with "invalid memory address or nil pointer dereference". - After
pcall catches an error, a closure and the function that made it share their local variables again, so updates the closure makes are no longer lost. - Loops whose body starts with code that never runs, such as
if false then … end, no longer skip statements, fail with "index out of range" or loop forever. - Table constructors such as
{10, 20, s = f()}, or ones with 50 or more items before a call, now put each value in the right place. Assigning (f()) or (...) to a local no longer overwrites other locals. - The generic
for fix from preview.27 now also covers code loaded with load, loadstring, dofile and require, and for k in next, t no longer skips keys. table.concat on thousands of items no longer fails with "registry overflow". string.gsub is much faster on long strings, taking 7 ms instead of 1.2 s for 100,000 matches, and a count of 0 or less now replaces nothing.- Iterators from
string.gmatch, io.lines and file:lines can now be stored and called directly. io.lines(name) on a missing file now raises an error that names the file. math.randomseed now gives the same sequence every time for the same seed, and each script has its own generator. math.random(0) and math.random(5, 1) raise "interval is empty" instead of crashing.- Deep recursion, including inside
pcall, now raises a "stack overflow" error with the file and line, and pcall can catch it. Before, it crashed the script. - Calling
coroutine.yield directly in an action's body now raises an error instead of breaking the next action. Yielding inside pcall in a coroutine raises "attempt to yield across metamethod/C-call boundary" instead of crashing on the next resume. - Very long arithmetic expressions now compile in under a millisecond. Before, Rex refused them as too long to compile.
- Key bindings in init.lua are about 12% faster and use less memory, and loaded scripts use less memory per function.
- Preparing for 1.0. This is mostly a test of our release automation for a 1.0.0 version number. This is not our gold master, we still plan to land a few bug fixes before.
- A terminal created with a different shell, such as fish or
wsl.exe, now comes back as that shell after a server restart instead of your default shell. If that shell is gone, the terminal starts with your configured shell instead. - Windows: Terminals now open on machines where security software such as BeyondTrust Privilege Management blocks job objects, instead of failing with "AssignProcessToJobObject: Access is denied".
rex wait --help now says that waiting for a target that had already closed reports it as not found, with exit status 3.- Resumed programs can now keep environment variables confiured via trust rules. Example:
rex.set("resume.trust.myagent.env.MYAGENT_HOME", "keep"). The built-in rules keep CLAUDE_CONFIG_DIR, CODEX_HOME, PI_CODING_AGENT_DIR, GEMINI_CLI_HOME, OPENCODE_DB and CRUSH_DATA_DIR, and rex config check lists the variables each rule keeps, with a kept_env field in --json. BROWSER set so remote links open through your local browser. Packages and install.sh now add a rex-open command, which works like rex open for tools that expect one program name in $BROWSER. New terminals get BROWSER=rex-open unless BROWSER is already set, so sign-in pages open on the machine you're using. This doesn't happen on macOS servers or Windows, and setting REX_BROWSER=off in the server's environment turns it off.- Resumed programs are real jobs again, making Ctrl-Z and others work properly. After a server restart, a resumed program now runs as a job of your own shell in zsh, bash, fish 3.2 and later, and nushell 0.115 and later. Ctrl-Z stops it and shows your prompt, and
fg brings it back (job unfreeze in nushell). Prompts like starship also show its exit status and run time. Other shells work as before. - Windows:
rex.exe and the MSI installers are now signed by Superlogical, Inc. This should remove Windows Defender warnings. - When an ssh host holds a login until you act, as Tailscale SSH check mode or Duo do, the CLI now shows what the host printed while you wait, such as the approval link. If the login fails, the error and the DETAIL column of
rex hosts check show those lines too. - An ssh login that may ask you something now waits up to 5 minutes for the host instead of 45 seconds, so a Duo push or Tailscale approval that takes a while still works. When ssh gives up, Rex no longer tries a second login that would send a second link or push.
- Across the several ssh logins one command makes, Rex now reuses only passwords and key passphrases. It asks again for Duo menu choices, one-time codes and security key PINs, so it no longer sends a push you didn't choose or a code that was already used.
- Rex now ships a resume rule for Mistral Vibe (
vibe --resume <id>), so Vibe 3.2.0 sessions come back after a restart. - Programs that Python starts with options before the script, such as Hermes's
python3 -I launcher, now come back after a restart. - Windows: Programs that send Program Resume reports with Windows paths, such as
C:\Users\me\code, now get resume records, so oh-my-pi sessions come back. rex run --wait, rex split --wait and rex wait no longer print usage help when the program exits with status 2, or "interrupted" when it exits with 130. Rex still exits with the program's status.rex skill setup without --session-naming now keeps each agent's own choice, so setting up a second CLAUDE_CONFIG_DIR no longer changes Codex's hook or makes Codex ask you to approve it again.- The skill now tells agents to start programs directly, or with
exec inside sh -c, so new tabs are named after the program instead of "dash". - Generic
for loops in init.lua and rex do scripts no longer crash or loop over the wrong value when the list starts with a function call, such as (tostring(s) .. "\n"):gmatch(...). - Apps can now pair devices with a server through the new
server.pairing.open, confirm, reject, close and remove API methods. Local callers also see a pairing member in server.status (API revision 30). - Forward your SSH agent.
rex forward ssh-agent lets ssh and git in every terminal of a session use the SSH agent on the machine where you run it, like ssh -A, and that includes terminals that are already open. Your keys stay on that machine. --agent forwards a different socket, such as gpg-agent's, and -s picks the session. To make this work, every terminal now gets its own SSH_AUTH_SOCK. It doesn't work on Windows. rex open opens links and files on the machine running the Rex app. For example, rex open report.pdf or rex open https://…. Localhost links are forwarded first, so you can use rex open as $BROWSER for sign-in flows. --client picks which app opens them, and -v shows which app was used and why.- Resume programs that don't report themselves. A
resume.trust rule with detect = true saves the program in the foreground, such as ssh -A devbox, and starts it again after a server restart. A new run key sets what to start when the process looks different from the command you typed, as with npm run dev. rex forward new now takes Unix socket paths for either end of -L and -R, such as -L /tmp/docker.sock:/var/run/docker.sock. Running the command again takes over the sockets that a killed run left behind. This doesn't work on Windows.rex run, rex split, rex new, rex session new and rex window new have a repeatable --env NAME=VALUE flag that sets a variable in the new terminal. --env NAME copies the variable from your shell. Values are saved with the terminal, so don't use this for secrets.- Program Resume now works on Windows servers with PowerShell, cmd.exe, nushell and Git Bash. On Windows,
rex skill setup now installs the Claude Code hook too, so Claude Code comes back after a restart. - Rex now ships resume rules for Pi (
pi --session <uuid>), Gemini CLI, Copilot CLI and Crush. Pi sessions come back once a Pi release sends reports. The other three are ready for when those agents start sending them. - Resumed programs in zsh, bash, fish, nushell and Git Bash now start after the shell's prompt hooks have run, so they get what tools like direnv set up. On Unix,
rex run --interactive does the same in zsh, bash and fish. - In zsh and bash, pressing Ctrl-C while the startup files of a resumed terminal are loading no longer closes the pane.
- Programs that suspend themselves on Ctrl-Z, such as Pi, Claude Code and neovim, no longer freeze the pane when they were started with
rex run or by Program Resume. They redraw and keep running. - Login shells that are wrappers, such as the one NixOS-WSL uses or a script that starts fish or zsh, now work with Program Resume and with terminals started with a command.
rex config check catches more mistakes in resume rules. Setting one flag to "keep" or "drop" no longer resets how many values it takes, and replacing a whole built-in rule now warns you. Typos get a "did you mean" hint. Flags can use the new "refuse" action, and dir = false clears a rule's folders.- Windows:
file:///C:/… links that come from a Mac now open the right file on a Windows host. - Alpine: The OpenRC services now use the
output_log, error_log, output_logger and error_logger settings from /etc/conf.d. The rex service's log is capped at 50 MiB, and --log-max-size now shows in rex server run --help. The login server's PAM policy has moved to /usr/lib/pam.d/rex-login-server. - Apps can now pass an
idempotency_key to session.create, session.new_window, session.new_split, session.new_layer and session.new_block, so retrying a request no longer creates duplicates. - Programs can resume after a server restart. See: https://www.superlogical.com/rex/docs/features/session-restore
- Claude Code resumes after a server restart. While OSC 7577 gains adoption, Rex has built-in support for Claude Code. This needs the hook that
rex skill setup installs. If you already have the skill installed, you don't need to reinstall it. rex config check shows the resume trust rules. A new section lists each rule Rex may use to start a program again: the built-in claude, codex and opencode rules and any you add with resume.trust in init.lua. Each rule shows its command, folders, flags kept and dropped, and the init.lua lines that changed or removed it. --json adds resume_rules and resume_rules_omitted.- Apps can now list a terminal's resume records with the new
program_resume_records API method and follow changes with the program_resume_changed event. - The session start hook from
rex skill setup no longer names the wrong pane when Codex's shared app-server or a Claude Code background session runs it. In those cases it tells the agent to pass -s and -b or ask which pane to use. - Windows: New terminals now get your environment variables from the registry, so PATH changes and variables like EDITOR show up without restarting the server. A PowerShell 7 installed after the server started now becomes the default shell, and Lua
rex.exec also finds newly installed programs. rex events no longer sometimes drops the last events a server sends before it closes the connection.rex cp copies files to and from a server. Run rex cp --help to learn more. Both the client and server need to be updated for this functionality.- Undo closing a pane, tab or session. A new
client.undo_close API method brings back what a client closed last, in the same place and with its programs still running. This works for up to about a minute, for closes the client marked as undoable. The apps don't use it yet, but will. - Move a tab to another session.
rex window move --to SESSION moves a window to another session without stopping its programs or losing scrollback. --before, --after or --index place it, and --focus makes it the active window there. Apps can do the same through the new session.transfer_window API method. - Windows:
rex server start --elevated, run from a terminal opened with Run as administrator, keeps administrator rights so admin shells really run as admin. Such a server only accepts programs that also run as administrator and listens only on its named pipe. Other programs get an error telling them to use an admin terminal, and rex server install won't accept --elevated. - Security: servers that listen on plain HTTP, such as loopback with
--allow-anonymous or a tailnet:// listener, now refuse browser connections that come from a DNS name over plain HTTP. This stops a DNS rebinding web page from taking control. A plain HTTP reverse proxy that serves a web client under a name now needs --websocket-origin-pattern. - Security: the ssh guard that
rex terminfo setup writes no longer passes the host name to a shell, which on OpenSSH older than 9.6 could run a command hidden in a host name. Run rex terminfo setup to rewrite an old guard. rex terminfo status now warns about unsafe guards and about recorded hosts the guard can't use, and rex terminfo host install and forget now update the guard and match hosts in any letter case. - Security: the login server now checks which user runs the server behind an account's socket and refuses one run by another user. An account's server also refuses callers that were forwarded for a different account.
- Lua scripts run with
rex do and the config's init.lua now look for require modules only next to the script, never in the working directory or LUA_PATH. A failed require now explains how to set package.path. - Terminals started with a command, such as
rex new -- claude, now always treat the first word as a program in bash, dash, ksh, mksh, oksh, yash, sh and fish. So rex new -- -c … looks for a program named -c, and shell functions no longer run in mksh and oksh. - nushell 0.115 and later: terminals started with a command now go through nushell, so programs that only your nushell config puts on PATH are found.
- FreeBSD: Ctrl-Z no longer stops the first program of a terminal for good, such as vim started with
rex new -- vim. - A terminal's folder is now saved within about a second of a change instead of up to 30 seconds, so after a crash it comes back in the right place. New panes are saved right away.
- Kitty images that programs send through shared memory or files now reach clients compressed, so a full-window image to another machine sends about a fifth as many bytes and arrives several times faster.
- A program can no longer crash the whole server by shrinking a Kitty shared memory image while Rex reads it. Rex also refuses PNG images that are too large and reads Kitty PNGs only from plain files.
- A program that prints queries but never reads its input, such as
cat on a file full of them, no longer makes the server's memory grow without limit. - HTML captures of a terminal now keep link targets only for http, https, mailto and file links, so a link printed by a program can no longer run script when you click it in a browser.
- The server now closes HTTP connections that sit idle for two minutes.
- A zoomed pane now stays zoomed while a floating pane on top of it has focus, and it is still zoomed when that pane closes.
rex window inspect shows the zoomed tiled pane as tiled-zoomed-block. - Windows: Resizing a terminal after its output was cleared no longer closes the tab.
REX_BLOCK replaces REX_SESSION. New terminals no longer set REX_SESSION. Commands run in a Rex terminal find their session from REX_BLOCK, and anywhere a session goes, including -s, you can pass a full block ID to mean the session that holds that block. You can still use session IDs, but its no longer injected automatically.- Server can be run on shared filesystems such as NFS. Rex now detects when its state was written by another machine and falls back to namespacing state by machine ID. The network filesystem must support file locks.
- Linux: read and inject /etc/environment in new terminals. New terminals now read this file like SSH does and injects the environment variables into your terminal session.
- install.sh now installs from the preview channel on a first run instead of falling back to snapshot, keeps the channel Rex came from when you run it again, and only changes channel when you pass
--channel. It also stops with an error if the channel can't be found, instead of trying another one. - Switching channels with
install.sh --channel now really moves Rex on dnf, zypper, apk, pacman and FreeBSD pkg, even when that means an older build, and the last line says whether Rex was upgraded, switched or moved to an older build. A re-run also repairs machines that an older install.sh left on the wrong build. - Snapshot packages for deb, rpm and pacman now use alpha in their version, so on every system a snapshot sorts before a preview and a preview before the release.
- FreeBSD:
pkg upgrade no longer offers to downgrade Rex to an old preview, portmaster -a no longer replaces Rex with GNU REX, and install.sh no longer writes a key fingerprint that pkg may fail to read. - FreeBSD: install.sh no longer installs only the binary without the rc.d services when it can't reach the package catalogue, and
--tarball won't overwrite a rex that the pkg package installed. rex server start --env now warns which variables it couldn't apply when a server was already running or systemd started it.- When rex.service keeps failing to start, commands that time out now show the server's last error and the journalctl command to run, instead of telling you to increase
--timeout. - When a login server or proxy answers 502, 503 or 504,
rex server status, rex ls, rex new and rex whoami now show the reason it gave, instead of saying no server is running. - The first request through the login server after a boot no longer fails with 502 when rex.socket runs the account's server. The login server also logs a warning with the
loginctl enable-linger fix when that server will stop because lingering is off. - ssh:// endpoints now work with IPv6 addresses in brackets, socket paths with spaces or %20 such as a Mac's Application Support folder, and users written with % escapes like foo%2Bbar.
- ssh:// hosts that are Macs are now found without naming a socket, because Rex also looks for rex inside the Rex app.
- With ForwardAgent on in ssh_config, terminals on an ssh:// host no longer get an SSH_AUTH_SOCK that stops working seconds later.
- With LogLevel ERROR in ssh_config, a stopped server on an ssh:// host is now noticed and started again, instead of every command failing with EOF.
- On ssh:// hosts that need a password, restarting the host's server no longer asks for the password again when the server comes back within about 10 seconds.
- When a rex command on an ssh:// host fails without its own error, the message now quotes what the host printed instead of saying no server is running.
- A new terminal now starts in your home folder when the server isn't allowed into the requested folder, such as /root after
sudo su -, instead of failing. - Programs such as Codex no longer drop clicks, because terminals now report focus only when it changes and mouse motion only when the pointer moves to another cell.
- macOS: Opening many terminals at once no longer fails now and then with "open /dev/ptmx: errno -6".
- Windows: Tab icons and status now follow the right program: an agent running tools stays shown, a pipeline shows its first command, programs started from Git Bash are found with their ports, and shells such as busybox work.
- Windows: Opening a WSL tab no longer fails with "OpenProcess: access is denied" on PCs where security software protects wsl.exe.
- The Rex skill for coding agents now explains how to reach machines with
rex -S ssh://HOST and install Rex there with rex server install. - Nix: Builds from source now have a version Nix can compare, so
nix profile upgrade and nix-env -u see them as upgrades. - New focus history API. Each user's focus history is now tracked. When you close or detach the focused pane, or close a tab, focus goes back to the pane or tab you were in before, not to the one next to it. A new API method lets clients step back through your recent panes, tabs and sessions, like an app switcher. The clients are not updated yet.
- ssh:// hosts behind SSH gateways connect. A gateway that refuses forwarded connections for a second or two after login no longer makes every command fail with an EOF error. Rex now tries again for up to 5 seconds. If the host still refuses, the error quotes ssh's "administratively prohibited" line.
rex do takes much larger arguments. Requests can now be as large as the server allows, which is currently 1 MiB, instead of being cut off at 64 KiB.- A long pick list in
rex do passed with --args no longer fails with "control message too large". - The help for
rex do now suggests passing large arguments with @FILE or -, and rex send can send larger text from stdin. - When a ProxyCommand or ProxyJump fails before login, Rex no longer runs it again and again or tells you to raise MaxStartups on the host. The error now quotes the proxy's own message, such as "command not found".
- On macOS, ssh connections started by the Mac app now run ssh with your login shell's PATH, so a ProxyCommand such as
aws ssm start-session works. - A large request on a slow connection no longer drops the connection.
- Windows:
rex server install now refuses work or school (Microsoft Entra ID) accounts and suggests rex server install --user. If an earlier install left such a service, the error tells you to remove it with rex server uninstall first. - Windows: When Windows doesn't start the Rex service, the error now points to the System log in Event Viewer, and
rex server logs explains a missing log instead of blaming a service manager. - Windows: REX_SESSION, REX_BLOCK, TERM_PROGRAM, TERM_PROGRAM_VERSION and COLORTERM are now added to WSLENV, so a WSL shell in a Rex terminal knows which block it's in and that it runs in Rex.
- An app connecting while another client destroys a session no longer loses its connection. The server now skips that session and attaches the others.
- The server log no longer gets a "websocket control ended unexpectedly" warning for every
rex command you run. - Nix: The home-manager module now warns about lingering only during activation, and only when lingering is off. Evaluation no longer prints the warning every time, which broke builds that use
--abort-on-warn. - Debian and Ubuntu: unattended-upgrades no longer replaces Rex. A few days after install, Rex could be swapped for the unrelated Perl package also named rex, and its services removed. install.sh now adds a second apt pin that blocks any other rex, and upgrading the .deb adds it to a pin file an older install.sh wrote. If Rex was already replaced, run install.sh again.
rex server run and rex server start have a new --log-level flag that takes debug, info, warn or error, and it takes precedence over -v.- A local socket in
REX_SERVER is now treated like --server, so an unreachable server doesn't create a default server. - When connecting runs out of time, commands now exit 4 and name the server, as in "connecting to Rex server http://box.example:7297 timed out after 10s".
- A reply that arrives just as
--timeout runs out is now kept, so rex new no longer loses the new session's ID, and a rex server stop that worked is no longer reported as failed. - When a local server accepts the connection but never answers, commands now stop at
--timeout with "did not answer". They no longer go on to start a second server. - Closing a terminal now also kills programs that ignore SIGHUP and were left in the shell's process group, or that started during the one-second grace period. In a script without job control,
nohup foo & is now killed too. - Stopping the server, destroying a session or closing a window now takes about one second in total when programs ignore SIGHUP, instead of one second per terminal.
- Terminals in a window you closed just before the server was killed no longer come back after a restart as hidden, detached blocks.
- The ssh process behind an ssh:// connection now exits when the
rex command that started it is killed or hung up, instead of staying logged in to the host. rex forward now finds and reuses a forward the server set up even though its reply was lost, so a -R forward on a fixed port no longer stays broken until you restart it. If a close gets no reply, Rex now names the forward's block and tells you how to close it.rex forward new, open and share now exit 3 with "session … is gone, so its forwards cannot start" when another client destroys the session during startup.rex kill, rex window close, rex close and rex forward close now succeed when another client is already destroying the session, instead of exiting 1 with "session is closing".rex window ls, rex block ls and rex forward ls with --all now skip a session that another client destroys while they list it. Asked about one session, they exit 3 with "the session was destroyed".- A client that is slowly reading a large reply over a slow connection is no longer dropped by the server's keepalive.
- A terminal that paused its output for a client that stopped reading, such as a sleeping laptop, now resumes as soon as another client connects to it, instead of showing only its snapshot for minutes.
rex do -C now fails right away with client_unavailable when the target app loses its connection, instead of waiting out the whole timeout.- An event too large to send no longer disconnects every client in the session.
- Key bindings can now name the extra keys on ISO and JIS keyboards by position:
[IntlBackslash], [IntlRo] and [IntlYen]. - Rex's session-start hook in Codex is now labeled "Loading Rex terminal context" instead of "Hook 1". Hooks that are already installed get the label the next time setup changes them.
- Terminals report all bound ports of their children. Terminal blocks have a new
ports method and ports_changed event that lists the TCP ports their programs listen on and which process holds each port. This can be hooked into automation and scripting in fun ways. rex forward open accepts block IDs. This forwards the port a program in that terminal listens on, such as a dev server you just started. If the programs listen on several ports, it lists each one as a rex forward open host:port command you can run.- If
rex forward new, open or share is killed, running the same command again now takes over the forwards it left behind instead of adding new ones, so a -R forward gets its port on the server back. The warning about leftover forwards now points to rex forward close. - Characters typed with Option, such as ⌥2 for @ on Swedish – Pro, are now sent as text when a program like Vim turns on modifyOtherKeys or Kitty's keyboard mode, instead of arriving as Alt chords such as À.
- Terminals restored while the server is paused or slow, for example when a laptop sleeps during startup, now get a second try with their saved state and come back with their contents and directory instead of as new shells.
- A terminal saved right after it starts, for example when you restart the server twice quickly, now keeps its directory.
rex server run now exits with status 0 after a clean stop even when a client still has a connection open, so systemd no longer records the stop as a failure.- A server that starts in a container no longer waits 5 seconds for an unrelated program that got the old server's process ID, and
rex server stop no longer fails for that reason when it deletes saved sessions. - Closing a session while a client is opening one of its terminals no longer ends the stream with an internal server error, so clients no longer try to reconnect to it.
- A layout change, such as moving a pane, made while its window closes is now refused with a conflict or not-found error instead of an internal server error, and it can no longer move a pane out of a window that is already closing.
- When an ssh host has autostart off, a burst of connections to its stopped server now asks the host once instead of again for each connection, which saves ssh logins.
- Windows: idle terminals are now suspended like on other systems.
- Windows: programs started from the Microsoft Store build of PowerShell 7 are now found for a pane's foreground program and its ports.
- The Rex skill for coding agents now explains how to forward ports with
rex forward. - TCP port forwarding. The new
rex forward command (also rex fwd) forwards TCP ports through a Rex server, the way ssh -L and ssh -R do, and reconnects by itself when the connection drops. rex forward new -L/-R sets up one or more forwards, rex forward open forwards a local port to something the server can reach and opens the URL in your browser, rex forward share makes a port on your machine reachable from the server, rex forward ls lists forwards and flags orphaned ones, and rex forward close closes them, with --orphaned or --all to close many at once. - Linux: install.sh works on more systems. On image-based Fedora systems such as Silverblue, Kinoite, CoreOS, Bluefin, Bazzite and Aurora, the script now installs just the rex binary instead of failing at dnf. In containers without systemd it skips
rex server install and tells you to run rex server start. install.sh now checks for tar, gzip, curl or wget and the other tools it needs, and suggests how to install any that are missing.REX_SERVER behaves identically to --server. Rex waits for it until --timeout runs out and shows that server's error, starting with "REX_SERVER: ", instead of quietly running your command on a local server after half a second.- A server that starts while the previous one is still saving now waits for it, instead of starting without your saved sessions.
- Alpine: The OpenRC service now gives the old server 15 seconds to finish stopping, it previously force killed too soon.
- A
rex command that gives up on a server it autostarted no longer kills it while another command is using it, so sessions created there no longer disappear. rex server run now saves and stops cleanly when its terminal closes. A server running under systemd, launchd or a container logs SIGHUP and keeps running instead of dying without a final save.rex server run piped into tee or run over ssh no longer dies when the program reading its output goes away.rex wait no longer hangs forever when the block it waits for closes just before it starts watching. It now exits 1 right away.- When the server on an ssh host stops while ssh stays connected, Rex now asks the host to start it again if autostart is on, or reports that no server is running and reconnects once one is back.
- On hosts that need a new ssh login for each connection, such as Windows, a refused key or changed host key is now reported once instead of being retried over and over, which could lock you out of the host.
- Terminal streams that drop and reconnect no longer get stuck when the client stops reading partway through catching up, or when a reconnect reply is lost.
We're increasingly using Antithesis (https://antithesis.com/) to test the Rex server, and many of the bugs above were found via Antithesis runs. We're expanding our property coverage and will continue to find and fix issues this way.
- Hotfix for broken
ssh:// connections from the macOS app. In v0.1.0-preview.17 they all failed with "keyword controlpath extra arguments at end of line", because the ssh connection-sharing socket sat in a folder with a space in its name (~/Library/Application Support/rex). Whoops. - Fewer ssh logins. Commands that make several connections to a shared host now share one ssh login, so you type a passphrase once and connections open faster.
- ssh logins that a busy host drops before they start, as sshd's MaxStartups does when many terminals open at once, are now tried again. If every try fails, the error says why and points to MaxStartups.
- A password, passphrase or host key question from ssh no longer times out and comes back while you're still answering it.
- A significant number of improvements and fixes for Windows servers, which continues to be under development.
- Update to libghostty-vt 1.0.1 which brings in a number of fixes and improvements: https://lib.ghostty.org/vt/release-notes.html
- A lot of groundwork for Windows. :) Hence the very light release notes here. There is a LOT in this release, but primarily preparation, fixes, improvements on Windows.
- Each terminal gets its own cgroup on Linux. With the systemd service, the NixOS or home-manager service, or
rex server install, each terminal now runs in a cgroup of its own. When memory runs out, systemd-oomd stops only the terminal that used too much instead of every session, and systemd-cgtop shows what each terminal uses. install.sh --user and rex server install ssh://host now work on systems without systemd, such as Alpine and FreeBSD. They install Rex, explain how to start a server, and no longer fail. Remote installs start the server with autostart on, and rex server uninstall ssh://host has nothing to undo there.- When
rex server install isn't supported on a system, the error now starts with what to do instead: run rex server start. - Fix:
-S ssh://host no longer fails with "socket path is too long" when Rex's runtime directory has a long path. Rex now puts its ssh sockets in a short folder under /tmp instead. - Fix:
-S ssh://host tunnels no longer use a shared ssh connection (ControlMaster) from your ssh config. Those connections could make a tunnel look lost or leave old forwards behind. - New terminals now tell programs their size in pixels from the start, so image viewers like chafa and Kitty graphics images get the right size before the first resize.
- The error shown when a Headscale server doesn't issue HTTPS certificates now names the settings to turn on, dns.certificates and dns.challenge.provider, instead of saying Headscale can't do it.
- New CLI
rex server install to setup your personal server on Linux. This configures the already-installed Rex package to start when the machine boots and keep running while you're logged out. rex server uninstall undoes it. This is a convenience over the packaged systemd units. This is currently Linux with systemd only, but we will expand it in the future. - Connect to Rex over SSH. Use
-S ssh://[user@]host with any CLI command to connect to a Rex server via an SSH connection. This uses your own ssh and ssh config. It will auto-start a personal server if none is running. This replaces Tailscale for many users. - Remote-install Rex over SSH with
rex server install ssh://host. This installs Rex on a Linux machine over ssh, sets up its server to start at boot and adds it to your hosts. It asks before each change. This is currently Linux with systemd only. This utilizes our already well-tested install.sh script. - Install Rex without root.
install.sh --user puts rex in ~/.local/bin without sudo and then runs rex server install. --tarball-file installs from an archive you copied over, for machines without internet access. - Stopping the systemd service, or the NixOS or home-manager service, no longer loses windows whose shell exits on SIGTERM, such as fish or nushell. The server now saves every session before its terminals close.
rex server status now lists every listener the server accepts connections on, with its bound addresses and who it lets in, and --json adds them as listeners.- On Linux without systemd-logind, such as Alpine,
rex commands you run on the machine now use the same server as the login server, so you no longer end up with two servers that each hold part of your sessions. - The Rex skill now teaches agents how to work on other hosts and what to do when a client refuses an action.
- Fix: The server no longer crashes on macOS when it starts many shells at once, such as while it restores your sessions.
- Files you drop or paste into a terminal on this server are now limited to 2 GB per terminal. When a new file needs room, Rex removes that terminal's oldest uploads, and it refuses an upload that would leave less than 2 GB free on the disk.
- Uploaded file names now lose invisible characters, such as right-to-left overrides and zero-width spaces, so the path Rex types into your shell shows what it really is.
- A relative
--state-dir now becomes a full path, so the path of an uploaded file points to the right file whatever folder your shell is in. - Files left behind by a server that crashed are now cleaned up even when the next server gets the same process ID, which often happens in containers.
--interactive for commands that need your shell setup. rex run, rex split, rex new, rex session new and rex window new have a new --interactive flag. It makes the command's shell also read files like ~/.zshrc, so programs that only those files add to PATH, such as OpenCode and Codex, no longer fail with "command not found".- Running
rex after su or sudo -E now finds the server your other sessions use instead of quietly starting a second one. When a server of yours is running in another runtime directory, the error names it and the -S flag that reaches it. rex server status and the rex server tailscale commands now use the server that REX_SERVER names, as other commands already did, and rex server tailscale pair suggests commands that reach the same server.rex whoami now shows the server's real API revision instead of always revision 0, and --json adds api_revision, api_min_revision and log_path.rex terminfo setup no longer breaks ssh on clients older than OpenSSH 7.8. It installs the terminfo entry, skips the ssh guard and tells you why.rex skill setup no longer fails when it can't find a known agent, and installs the skill in ~/.agents/skills instead.- The Rex skill now teaches agents to run work on your other hosts with
rex hosts and rex -S HOST. It also tells them that client actions need Remote Control turned on and the app open. - New terminals now set SHELL to your current login shell, even if you ran
chsh after the server started. - Headscale and other control servers. The new
--tailscale-control-url flag on rex server run and rex server start, --control-url on rex server tailscale on, and the NixOS and home-manager option tailscale.controlUrl sign the built-in Tailscale node in to a self-hosted control server such as Headscale. Each control server keeps its own login, and rex server tailscale status shows which one is in use. - Ubuntu 18.04 and Amazon Linux 2. Rex now runs on glibc 2.26 and newer instead of 2.28. Ubuntu 18.04 gets the full package from the Rex repository. On Amazon Linux 2, the installer puts only the rex binary in /usr/local/bin and explains why. On a glibc that's too old, such as CentOS 7's, the installer now stops with a clear error before it changes anything.
- Systemd user units for a personal server. The .deb, .rpm and Arch packages now include rex.service and rex.socket in /usr/lib/systemd/user. Run
systemctl --user enable --now rex.socket without sudo, and your own server starts the first time a rex command connects and comes back after rex server stop. They're off by default, and an administrator can turn them on for every account with sudo systemctl --global enable rex.socket. - The server supports minimizing floating panes, which the Mac app's new Minimize Floating Window needs when it's connected to a Linux server.
- The Linux installer now works on Omarchy. It installs or upgrades Rex without a full system upgrade, which Omarchy's update guard was blocking, and from then on
omarchy update keeps Rex up to date. - The installer no longer fails on Debian and Ubuntu machines where /bin/sh is BusyBox. It also gives a clearer error when apt can't find a Rex package for your architecture.
- The hand-setup steps for the apt and rpm repositories now save their files with mode 0644. Under a strict umask,
apt-get update no longer fails with "not signed". rex server status and the rex server tailscale commands now use the server that REX_SERVER names, as other commands already did. When your personal server isn't running but the shared server is, the error now tells you how to reach the shared server, and rex server tailscale pair suggests commands that reach the same server.- Running
rex after su or sudo -E now finds the server your other sessions use instead of quietly starting a second one. When a server of yours is running in another runtime directory, the error names it and the -S flag that reaches it. - New terminals now set SHELL to your current login shell, so it's right even if you ran
chsh after the server started. - Terminals no longer exit right away with status 127 when Rex runs in an x86-64 container under Rosetta on Apple silicon, such as in OrbStack, Docker Desktop or Rancher Desktop. They also no longer fail with "invalid argument" under QEMU emulation.
rex terminfo setup no longer breaks ssh on clients older than OpenSSH 7.8, such as on Ubuntu 18.04 or Amazon Linux 2. It installs the terminfo entry, skips the ssh guard, and tells you why.- Programs that send large Kitty graphics frames use less server CPU and memory. When an image can't be read, the program now gets the real reason instead of "unsupported medium".
rex whoami now shows the server's real API revision instead of always saying revision 0, and --json adds api_revision, api_min_revision and log_path.rex skill setup no longer fails when it can't find a known agent. It installs the skill in ~/.agents/skills instead, which most agents read.- Fixed a rare stall that could lose a pane's saved state when the server saved sessions.
- Headscale and other control servers. The new
--tailscale-control-url flag on rex server run and rex server start, and --control-url on rex server tailscale on, sign the built-in Tailscale node in to a self-hosted control server such as Headscale. Each control server keeps its own login, and rex server tailscale status shows which one is in use. - Minimized floating panes. The server now supports minimizing floating panes, which the Mac app's new minimize needs. The new
session.set_layer_state API method minimizes a floating pane, brings it back, or brings it back with focus, all in one step. - When a program sends a Kitty graphics image as a file or shared memory that Rex can't read, the program now gets the real reason, such as "EINVAL: invalid data", instead of "unsupported medium".
- Programs that send large Kitty graphics frames, such as video players, use much less server CPU and memory, and on macOS frames now reach the app at the full frame rate.
- Support systemd socket activation. The Linux packages now include rex.socket and rex-login-server.socket. Enable one of them instead of its service, and systemd starts the server or login server when the first client connects rather than at boot. Both are off by default.
- Socket activation in the NixOS module. The new
services.rex.socketActivation and services.rex.loginServer.socketActivation options set up the same on-demand start, including the Tailscale Serve socket when it's turned on. rex --server with a socket path outside your own runtime directory no longer starts a personal server there. For /run/rex/server.sock and /run/rex/login-server.sock, the error tells you which systemd service to start. For other paths, it suggests rex server run --listen.- Starting a server in a directory you can't write to now gives an error that names the directory, instead of a bare "permission denied".
- Terminals open faster from clients that support it, because the server can now hand out their connection tickets as the client connects.
- Hosts over SSH-forwarded sockets.
rex hosts add, rex hosts edit and rex.host in init.lua now accept a Unix socket path, such as one ssh -L forwards, as /path/to/rex.sock or unix:///path/to/rex.sock, and rex hosts check reports a missing or stale socket as not reachable from here instead of down. rex server stop now waits until the server has finished saving and exited, and it no longer says no server is running when you run it right after rex server start.- The new
REX_AUTOSTART variable sets the default for --autostart, so REX_AUTOSTART=0 makes a rex command that can't reach the server stop with an error that says why. rex --server with a socket path outside your own runtime directory no longer starts a personal server there, and the error tells you to start the system service or run rex server run --listen instead.- Starting a server in a directory you can't write to now gives an error that names that directory, instead of a bare "permission denied".
rex server run now accepts sockets passed by systemd, and the Linux packages include rex.socket and rex-login-server.socket, which are off by default and start the server on the first connection.
- Sessions survive server restarts. The server now saves your sessions and brings them back when it starts again. That includes their windows, splits, names and IDs, so scripts that use those IDs keep working. Each terminal comes back as a new shell in the directory it was in, but scrollback isn't restored yet. Restart the server once to get this, because the first restart comes from the old server, which saved nothing.
- Hosts over SSH-forwarded sockets.
rex hosts add, rex hosts edit and rex.host in init.lua now accept a Unix socket path, such as one ssh -L forwards from this machine, as /path/to/rex.sock or unix:///path/to/rex.sock. Devices where the path doesn't exist skip it and try the host's next address. - The new
rex server stop --discard stops the server and deletes its saved sessions, so the next start begins with none. With no server running, it only deletes them. Add --state-dir if the server was started with one. rex server run and rex server start take --restore=false to start without the saved sessions. A server started this way also saves nothing, so the saved sessions are still there for the next start.rex server stop now waits until the server has finished saving and exited. A rex server start right after it gets everything the old server saved.rex hosts check now reports a socket path that doesn't exist, or one left behind by an ended ssh -L forward, as not reachable from here instead of down.- Fixed
rex server stop saying no server was running when you ran it right after rex server start. - Updates Tailscale to 1.104.4
tailnet:// listeners now work when tailscaled runs without root using --tun=userspace-networking, instead of failing at startup with "cannot assign requested address". Use tailnet://:PORT in this mode, and restart Rex if you change how tailscaled runs.- With
rex server run --tailscale or rex server tailscale on, the server now gets its HTTPS certificate before it reports that it's ready. Your Mac and iPhone no longer time out connecting by host name or pairing code while the certificate is still being issued. The pairing QR code waits until the certificate is ready, and the log shows the URL to connect to. - The new
REX_AUTOSTART variable sets the default for --autostart. On a machine that runs Rex as a system service, you can set REX_AUTOSTART=0 in /etc/environment so a rex command that can't reach the server stops with an error that says why. Before, it started an empty personal server. - Fixed a server crash when a device on your tailnet dropped its connection before the server accepted it, for example on a flaky relayed link.
- When a connection times out, the error now says how far it got, such as a TLS handshake that didn't finish. A server that stalls no longer looks the same as an address where nothing answered.
- FreeBSD support and packages. The server now works on FreeBSD. This isn't as well tested as Linux, so I appreciate any help to test on this platform. The docs have been updated with FreeBSD installation instructions.
- Steadier connections on slow networks. The server now waits much longer for clients on slow or lossy links before dropping them, and no longer closes a busy connection just because a keepalive ping is stuck behind output that's still arriving.
- The server now compresses terminal data sent to clients that support it, so it uses less bandwidth.
- The installer now installs Rex on Debian and Ubuntu even when they offer (R)?ex, an unrelated Perl package also named rex, and replaces (R)?ex if it's already installed. On Fedora, it asks you to remove the Rex package (capital R) first instead of failing with a file conflict.
- Rex no longer refuses every Tailscale Serve request after a reboot when it starts before Tailscale has logged in. It now checks who owns the host on each request, and also notices if the host is later logged in as another account.
home-manager switch no longer restarts a running Rex server, which ended every session. Run systemctl --user restart rex when you want the new version, or set systemd.user.services.rex.Unit.X-SwitchMethod = "restart" to get the old behavior back.- In the home-manager module,
programs.rex.package can now be null, so you can manage init.lua without installing a second copy of rex. rex server start, stop and logs now work on machines without systemd-logind, such as containers, because the server socket goes in ~/.local/state/rex/run when there's no usable runtime directory.- The ssh guard that
rex terminfo setup writes now runs under /bin/sh, so ssh and git no longer print an error before every command when your login shell is Nushell or tcsh. rex terminfo setup now notices when your ssh config already includes Rex's guard and skips the guard file and Include line.rex server start, rex server stop and rex server logs now work on Linux machines without systemd-logind, such as containers, by keeping the server socket in ~/.local/state/rex/run when there is no usable runtime directory.- A server socket path that's too long now gets an error that names the path and suggests
REX_RUNTIME_DIR, instead of a bare "invalid argument". - home-manager module. The Nix flake now has a home-manager module for machines that NixOS doesn't manage, such as Fedora or Amazon Linux with Nix.
programs.rex installs Rex and sets up your account for xterm-rex, and services.rex runs your personal server as a systemd user service that keeps running between sessions, with optional Tailscale access. - Fixed an error that appeared before every
ssh and git command after installing Rex when your login shell is Nushell or tcsh, which also stopped Rex's ssh guard from working. - On Arch, normal users can run
pacman, yay, paru and checkupdates again after installing a pre-release, instead of getting a permission error about /etc/pacman.d/rex.conf. To fix an existing install, run the installer again or run sudo chmod 644 /etc/pacman.d/rex.conf. systemctl start rex now waits until the server accepts connections, so a command run right after it always finds the server. Starting it also fails right away if the server can't open its socket.rex terminfo setup and rex terminfo status now notice when your ssh config already includes Rex's guard, as the home-manager module sets up. Setup then skips adding a second copy, and status no longer reports problems.- Includes upstream terminal engine fixes for memory safety, plus a fix that removes Kitty images along with the scrollback history they were in when you clear it.
- Arch Linux packages. The installer now sets up a signed Rex pacman repository on Arch Linux and distributions built on it, such as Manjaro, EndeavourOS and CachyOS, and installs Rex with pacman. Updates then arrive with your normal system upgrades.
- The Nix flake no longer crashes at startup on current nixpkgs-unstable, where a newer patchelf broke the Linux binary.
- Fixed a server crash on Linux kernels with large memory pages, such as the Raspberry Pi 5's, which closed every terminal when a new pane opened.
- Programs that report they're working or blocked no longer stay that way in Activity after you stop them with Ctrl+C, even without shell integration.
- Fixed pieces of Kitty image commands showing up as text in the terminal, for example with yazi's image previews.
- The login server now gives the same answer for an account you can't use whether or not it exists, so callers can't use it to find out which accounts are on the host. Its error messages also no longer show the account policy's file path, which now goes in the server log.
- On Arch, upgrades now load updated systemd unit files before restarting Rex, so changes to them take effect right away.
rex skill setup no longer tells agents to name the session after their task unless you pass --session-naming, and running setup again keeps the choice you already installed.rex --server https://host now tries port 7297 alongside 443, so saved HTTPS addresses still connect to servers that Tailscale Serve publishes on port 7297.- Bare host names given to
rex --server now try HTTPS on ports 443 and 7297 at the same time, so connecting is faster when Rex is only on 7297. - The Nix flake now serves Rex over Tailscale Serve on port 7297 instead of 443, so web servers like nginx on the same host keep getting their tailnet HTTPS traffic. Set
services.rex.tailscaleServe.httpsPort = 443 to keep the old port. - Servers that join the tailnet with
--tailscale recover from lost packets much faster, which fixes slow connections and laggy sessions on lossy networks. - The server now logs a warning at startup when a network interface is too small for Tailscale's packets (an MTU below about 1360 bytes), and suggests how to fix it. Otherwise these connections can stall on larger output.
- Fully Kitty graphics support, including local files. The terminal server now understands and processes Kitty graphics properly, including automatically rewriting local file reads to direct chunked contents to remote clients.
- IO performance of terminal processing is now within 1% of libghostty (the fastest we can go). We previously regressed ~30%.
- Terminal images now survive reconnects, including images in scrollback, and larger images display correctly in the apps.
- Remote terminal programs can now display images loaded from files or shared memory on their host.
- Programs launched through wrappers such as
go run no longer leave tabs showing a compiler after it exits. - Large text selections no longer disconnect clients watching the session.
- New terminals now load login profiles, so profile settings and tools added to your PATH are available.
- Installation commands are available again on the main installation page.
rex server tailscale pair prints a pairing QR code so you can connect another device from a server without a desktop.rex capture now handles large scrollback and HTML captures without failing on the response size.rex skill status --json reports each agent's automatic session naming choice, and --session-naming now appears in setup help.- Docs: added DetSys Nix specific installation instructions cause they're different than standard Nix
- Docs: added upgrade page: https://www.superlogical.com/rex/docs/linux/upgrading
- Packaging: fixed some install.sh issues for upgrades across platforms
- Packaging: Nix flake now waits for Tailscale to be ready (when enabled) to startup more reliably
- Packaging: Systemd units and OpenRC scripts strip
GODEBUG, since some systems had this set to a value that crashed Rex