Railmux — terminal workspace for coding agents

A persistent terminal workspace to navigate, resume, and run
Claude Code and
Codex sessions across all your projects.
Devin CLI is available as a provider preview.
Railmux gives tmux a project-aware sidebar and one or two live agent panes.
Every agent runs independently, so browsing, switching, detaching, and
responsive layout changes do not interrupt in-progress work.
Website & live demo ·
Releases ·
PyPI
- Manage sessions from one sidebar — start new work, preview or resume
history, and switch among live Claude Code and Codex agents.
- Find existing work automatically — resumable conversations started
outside Railmux appear in the same project-aware sidebar.
- Run two agents together — use single, side-by-side, or stacked layouts
without stopping the agent hidden by a layout change.
- Leave without losing momentum — detach one terminal or soft-quit the
shared UI while detached agent sessions keep running.
- Use it comfortably over SSH —
railmux ssh coalesces superseded redraws
and provides responsive, locally cached history scrolling plus local
drag-to-copy inside either Claude Code or Codex panes.
One-off non-resumable invocations such as codex exec are intentionally
filtered from the sidebar.
Quick answers: use the mouse ·
switch agent modes ·
start or resume a session ·
copy text from an agent pane
Why Railmux?
Agent conversations tend to outlive the terminal tab where they began.
Railmux replaces tmux-window bookkeeping and copied session IDs with one
sidebar: select a project, preview or resume its history, and switch among live
agents without losing their context.
Quick start
On macOS, Linux, and WSL, Railmux requires Python 3.9+, tmux, less, and
Claude Code or Codex on PATH. Native Windows requires Python 3.10+ and a
Windows-native Claude Code or Codex; Railmux manages its own private
MSYS2/tmux/Python runtime. One supported agent CLI is enough to start.
The supported native-Windows full-screen renderer is Windows Terminal
1.24.10621 or newer. It is a terminal-host requirement, not a package that
pip installs. Other ConPTY/xterm-compatible Windows terminals may work, but
their mouse, IME, clipboard, and synchronized-redraw behavior is best effort;
see the support matrix.
pip install railmux
# or: pip3 install railmux
railmux
To try Devin, use Railmux 0.4.2 or newer on POSIX or WSL and follow the
Devin setup.
On native Windows, that same two-command flow is intentional. The first
railmux launch explains and asks once before installing the private runtime,
then opens the ordinary Railmux UI inside it. A fresh runtime uses roughly
700 MB because it contains a complete MSYS2 compatibility base, tmux, and
Python—not because the Railmux package itself is that large. Later versions
normally reuse the verified base automatically.
Railmux requires tmux 2.7+ on macOS, Linux, and WSL. Windows installs and
maintains the required private tmux automatically; it does not replace Git
Bash, adopt an existing MSYS2, edit the system PATH, or move provider data.
Codex and Claude Code remain native Windows programs and keep using the same
%USERPROFILE%\.codex and %USERPROFILE%\.claude directories as direct
PowerShell launches. Advanced inspection, repair, and removal procedures live
in the Windows runtime guide.
If installation succeeds but your shell says railmux: command not found,
the Python user scripts directory is not on PATH—this is especially common
with user-level Python installs on macOS. Add it for the current shell, then
put the same line in ~/.zshrc (macOS default) or ~/.bashrc:
export PATH="$(python3 -m site --user-base)/bin:$PATH"
On POSIX/WSL, if tmux is missing, an interactive Railmux launch can offer to
install it with Homebrew on macOS or apt-get on Debian/Ubuntu/WSL, always
after showing the exact command and asking for confirmation. See
FAQ 5 when system Python
requires a virtual environment.
Preference prompts appear only when relevant—for updates, Codex auto-run,
layout retention, or Claude history on a managed Windows/SSH display. Persistent choices are
not permanent traps: press o, or choose More → Options, to change them
later. One-time safety confirmations such as dependency installation and
session deletion are intentionally asked at the action itself.
For setup outside the full-screen UI, run railmux config; it edits the same
settings as Options and also covers executable paths, managed history capacity,
and the runtime locale. Use railmux config --remote your-server to configure
that host without opening or resizing its tmux workspace. See
Configuration for the complete interface.
If ordinary SSH cannot keep up with full-screen redraws, install Railmux on
your local macOS, Linux, WSL, or native Windows environment and use its
responsive, locally cached SSH display:
railmux ssh your-server
The local machine needs an OpenSSH-compatible ssh executable on PATH;
Railmux checks this before entering its full-screen display.
For several SSH options, use a single quoted group, for example
railmux ssh your-server --ssh-args='-J jump-host -p 2222'.
The remote needs Python 3.9+ and tmux. With permission, the local client can
install its matching helper into the remote user environment; it never uses
sudo. If you prefer to install it yourself, see
the SSH FAQ for the railmux[ssh] command.
Railmux keeps its managed workspace separate from the remote account's default
tmux server and never rewrites ~/.codex or ~/.claude histories except for a
session you explicitly confirm deleting. Run railmux doctor for a
privacy-safe local setup report, or
railmux doctor --remote your-server for a read-only remote compatibility
preflight. Multiple terminals share one workspace; see
FAQ 6 for focus and
layout limits.
A Linux or macOS client can also connect to a Windows account with
railmux ssh --remote-platform windows USER@HOST when its matching managed
runtime is already installed. Railmux does not install a Windows runtime over
SSH.
Controls
Mouse
| Action |
Effect |
| Left-click (non-running) |
Preview session history in the Target pane |
| Left-click (running) |
Switch the Target pane to that session |
| Wheel over a live agent |
Scroll its live terminal history (Railmux-managed on native Windows and over railmux ssh; tmux/provider-native on POSIX/WSL local) |
| Double-click |
Open/attach in the Target pane and move focus there |
| Right-click session |
Context menu (Open, Preview, Info, Rename, Star, Copy title, Term, Delete, plus Kill while running) |
| Right-click project |
Copy absolute path, Star/Unstar, Info, or open managed Term |
Unavailable context-menu actions are hidden for the selected session state.
Single-click and ␣ act in the Target pane without moving keyboard focus, but
␣ always means history while a click on a running row means live attach.
Double-click and Enter also move focus there. The terminal must report mouse
buttons to applications for these actions to reach Railmux. Right-click
reporting is sometimes a separate setting from ordinary mouse reporting; see
FAQ 2.
Copying text out of an agent pane also depends on the connection and terminal;
see FAQ 1.
Navigation
| Key |
Action |
↑ / ↓ |
Move selection within the focused pane |
Tab / Shift-Tab |
Cycle focus through Projects, Sessions, Running panes |
Ctrl-B Tab |
Toggle directly between the sidebar and Target pane |
Esc |
Move focus up: Running → Sessions → Projects |
/ |
Filter the focused Projects, Sessions, or Running pane by name |
Session actions
| Key |
Action |
Enter |
Resume or start the selected session |
n |
Start a fresh session in the current project |
g |
Search sessions across agents |
a |
Toggle all agents while Running has focus |
i |
Popup with session details |
r |
Rename the focused session |
s |
Toggle star — starred sessions pinned to top with ⭐ |
k |
Kill the running agent process (keeps session file) |
d |
Delete the focused session (confirms, then finishes in background) |
t |
Open or return to the managed terminal below the Target agent |
T |
Return to that agent's managed Vim viewer, when open |
m |
Open the agent Mode picker |
o |
Open persistent Railmux options |
␣ |
Preview canonical history for the selected stopped or running session |
F8 |
Cycle agent layout: single → side-by-side → stacked |
F9 |
Fullscreen the focused agent, managed terminal, or Vim (toggle) |
? |
Full help popup with all keybindings |
q or Ctrl-C |
Quit with confirmation |
Inside Help, press A or click Ask Railmux with Claude Code/Codex to open
a separate, safety-restricted support session for the current mode. Opening
Help itself never starts an agent or uses provider tokens. Ask Railmux replaces
only the Target pane's display; the agent that was there keeps running and can
be selected again from Running. Codex help is not saved to normal history;
Railmux hides the dedicated help workspace from both providers' Projects list.
Local documentation reads and searches run without approval prompts. Codex is
still enforced by its read-only, network-disabled sandbox; Claude is restricted
to its built-in Read, Glob, and Grep tools, with shell and mutation tools
not exposed. These restrictions depend on the installed provider CLI accepting
the documented safety flags; an incompatible CLI fails closed instead of
starting an unrestricted help agent.
If the help agent exits in a two-pane layout, that pane returns to Railmux's
empty launch surface without collapsing or reordering the other agent pane.
After a soft restart the help session is not restored automatically—open Help
and choose Ask again to reconnect to it.
+ New project works in each available agent mode. Browse to an
existing directory and choose . (use this path), or type a new relative,
absolute, or ~-based path. When no existing entry matches, select the
explicit + create … row (it is focused automatically) and press Enter;
railmux creates the directory before starting the agent.
The rename popup starts with the current title pre-filled. Press
Ctrl-U to clear the entire input, Enter to save a non-empty title, or Esc
to cancel.
After a delete is confirmed, its popup closes immediately. The bottom-right
status shows Deleting “session name”… while Railmux stops the exact
provider session and removes its history in the background, then reports the
final result.
Press / in Projects, Sessions, or Running to filter that section. Active
filters are marked with [filtered] and survive a soft restart; reopening /
shows the current value. Press Ctrl-U in the filter editor to clear it, then
Enter to return to the sidebar.
The first Button Bar row keeps Help, Quit, and Detach visible. Select More
to reveal a second row with Mode, Layout, Search, and Options.
Select Less to collapse it. The m, F8, g, and o shortcuts work while
the row is hidden. Narrow sidebars show action names with fewer shortcut labels.
On tmux 3.4 or newer, click the bottom-left agent label
to open the Mode picker, or click the layout symbol to cycle layouts.
Clicking the message at bottom-right copies its complete text to the local
clipboard. Expanding the second Button Bar row takes
its one display line from the bottom Running section; Projects and Sessions
keep the same heights.
After an explicit layout change (F8 or [ / ]), quitting offers to keep
the current pane proportions: Always keeps the latest custom layout,
This time restores it on the next launch only, and No leaves it
unsaved for this exit; Never also disables future layout prompts.
[ and ] move only the sidebar's right divider; dual-agent layouts split
the remaining area evenly again.
Proportions, rather than cell counts or tmux pane identities, are stored, so a
later terminal may have a different size. If a saved split cannot fit, Railmux
uses safe responsive defaults for that run without overwriting the saved
profile. The first Codex auto-run prompt uses the corresponding choices:
Always, This Railmux run, No, or Never.
Press o, or select More → Options. The first screen shows the Agent
mode picker and the current Claude history, Codex history, and
Devin history policies. Open any history row and choose Local or
Native. Claude also offers Ask on scroll. Select Back to Options
to return to the first screen.
Use the arrow keys and Enter/Space, or click a row. Selecting the active
policy closes Options. Esc and o also close it. Below the agent settings,
Layout retention, Codex auto-run, and Railmux updates offer
Always, Ask every time, and Never. Layout retention applies on
exit. Codex auto-run applies to future launches.
Switching agent modes
Press m or select More → Mode to open the same agent picker. Use the
arrow keys and Enter or click a provider to switch. The bottom-left agent
label and Options → Agent mode also offer direct selection. Railmux starts
in your last mode if it is still available.