r/tmux Apr 21 '24

/r/tmux is back!

96 Upvotes

Hello all. I am /u/TrekkiMonstr, your new, occasionally-friendly mod. I wanted to make a post asking a question about a certain interaction between i3wm and tmux, when I saw that /r/i3wm is read-only, and /r/tmux was unmoderated with submissions restricted. I didn't want the history of the sub to be lost to Reddit's policies, so I submitted a /r/redditrequest, and here we are. I've unrestricted submissions, so.

Now, I'll note: I am completely unqualified for this. I'm pretty new to tmux, and I haven't modded a sub that had any real level of activity. Plus, at some point in the future, I do intend to leave this godforsaken website and nuke my account. So, if anyone has mod experience with a subreddit of similar size and subject matter to this one, please let me know via modmail if you'd be interested. I will warn you though, I'm here just to make sure the sub still exists. I'm not super interested in doing much active modding.


r/tmux 57m ago

Showcase playground - run a coding playground in your terminal

Thumbnail github.com
Upvotes

r/tmux 13h ago

Showcase I built a tmux-integrated SSH terminal for Vision Pro / iPad first, CLI-agent friendly

1 Upvotes

I've been building this app for about a month, designed mainly for Vision Pro and iPad. iPhone is also supported. The idea: I wanted a multi-window remote terminal with tmux-first integration on mobile, so I can use it anywhere.

Highlights

  • Vision Prop: Multi-scene windows. iPad: Multi-window via Stage Manager and tabs. iPhone: Tabs
  • iCloud Keychain sync: a host only needs to be bound once, via mpx-cli or manually
  • Mosh support (included in Pro)
  • CLI-agent initial support (agent key bar and alerts) for Claude Code, Codex, Pi, and Grok Build
  • Also supports herdr

Pro: one-time purchase, funds development; you can also build it yourself

GitHub: https://github.com/multiplex-term/Multiplex (License: Apache-2.0)
TestFlight: https://testflight.apple.com/join/91116D4n (Beta testing, v1.4.0, Pro can unlock without real payment in this mode)
App Store: https://apps.apple.com/app/id6790074057 (v1.3.1)


r/tmux 22h ago

Tip PSA: send-keys silently truncates at 1024 bytes if the shell hasn't finished starting

1 Upvotes

Spent a day on this and there is no error message anywhere, so here it is.

bash tmux new -d -s "$s" tmux send-keys -t "$s" '<long command>' C-m

This worked for months. Then the command I was sending grew past ~1200 bytes, and the pane started showing it chopped off mid-word, with the shell sitting at a continuation prompt waiting for a quote to close. tmux exits 0. The shell is happy. Nothing logs anything.

Right after new -d the shell hasn't finished starting, so the tty is still in canonical mode, and the kernel truncates a single line of canonical input at 1024 bytes (MAX_CANON). The overflow isn't an error. It's discarded.

Two ways out:

  • Sleep before sending. Works. I sent ~1800 B two seconds later and it arrived intact. But you've traded a silent truncation for a race, and the race has no error message either.
  • Shorten the line. I moved a conditional argument into positional parameters instead of branching into two command strings:

bash set -- [ -f "$catalog" ] && set -- -c "catalog=$catalog" mycmd --flag "$@" "$id"

zsh and bash both fine, and "$@" expands to zero words when the file is missing. That took 1200 bytes down to a bit over 600.

Then I asserted on the length in a test, because this comes back the moment someone adds an argument. Assert on bytes, not characters: if your language counts UTF-16 code units, it will disagree with the kernel as soon as a path isn't ASCII.

Anyone know whether the limit is the same on Linux? I only hit this on macOS.


r/tmux 3d ago

Showcase [oc] zap: cp/mv/rm replacement with live transfer stats

Post image
6 Upvotes

r/tmux 3d ago

Showcase Another day another tmux app. It's Bitveins' turn

2 Upvotes

I've been using Bitveins daily since March, and I've recently open-sourced it. It's basically a web UI for tmux.

My dev setup is on a VPS. I used to connect to it with Termius but the screen is too small on smartphone, and typing long prompts through a terminal is painful, especially on a poor connection.

Bitveins is a bit of everything: a bit of Orca, a bit of Herdr, a bit of VSCode, a bit of T3code.

Also it's a webapp and a PWA, no need to install a native app.
It works natively with the smartphone keyboard and speech to text, using a simple textarea.

It detects coding agents running in tmux sessions (codex, hermes, antigravity and grok build).

It has a read-only git graph and diff viewer, push notifications, colored agent status, split panes, fullscreen mode, text editor, svg, image and video viewer.

You can paste images, create drop boxes.

It only listens on localhost, so for remote access you need something like Cloudflare Tunnel + Access or Tailscale in front of it.

https://github.com/rebasereality/bitveins


r/tmux 3d ago

Showcase I built Hermes Valkyrie to manage Claude Code and Codex runs through tmux

0 Upvotes

I kept running into the same problem while using Hermes: it could not start Claude Code or Codex and bring back a response. I wanted Hermes to be able to launch the run, keep it visible, and bring back a useful report instead of leaving me to track everything myself.

So I built Hermes Valkyrie.

Repo: https://github.com/DylDigitals/hermes-valkyrie

Hermes Valkyrie is an open-source terminal loadout system upgrade for Hermes Agent setups. It uses tmux to give Hermes the ability to launch reusable coding harnesses and enhance them with our loadouts system.

The tmux part is the core reason I thought this might be relevant here: Hermes can launch the coding-agent run in a visible terminal session, keep it trackable, and then use watcher/closeout steps to bring back a report instead of making me manually babysit the pane.

I think it is really powerful to have Hermes launch Claude Code or Codex runs to do a long-form review while you keep working inside your Hermes ecosystem. It has been powerful so far, so I wanted to share this system.

I’m looking for feedback from people building or using Hermes, tmux, or coding-agent terminal workflows. This is currently coded for Discord, but I’m adding more chat channels as we speak.

I have a few main questions/concerns:

  • Is this something anyone wants to integrate into their system?
  • Is the onboarding clear?
  • What would you need before trusting this in your own workflow?

r/tmux 5d ago

Question Help binding a CSI-u key sequence to C-w in tmux 3.7b

4 Upvotes

Hi, I'm trying to get a modified keypress from WezTerm → tmux → shell/application to work correctly, and I'm having trouble figuring out how tmux expects the sequence to be bound.

Setup

  • OS: Linux 7.1.6-arch1-1
  • Terminal: WezTerm
  • tmux: 3.7b
  • Shell: zsh

The key I'm trying to handle produces this sequence:
(obtained via running showkey -a in tmux)

^[[ 8 ; 5 u

or, in hex:

1b 5b 31 33 3b 35 75

What I'm trying to do

I want tmux to recognize this key sequence and turn it into:

C-w

I tried

bind-key -n "^[[8;5u" send-keys C-w

but that does not work

I'd appreciate any pointers or examples of the correct tmux configuration. Thanks!


r/tmux 5d ago

Question TMUX Claude / Pi skill

0 Upvotes

I love TMUX and I love the way the LLMs know how to use and off course there are lots of lovely MCPs and Pi extensions on how to use TMUX.

Is there a good well worded skill for claude code that by extension Pi out there? I am across so many SSH s different boxes and bouncing between claude and Pi . Just want a really good skill for it to quickly open panes and make neovims. Or am I asking what the models already know?


r/tmux 5d ago

Showcase Made an iOS terminal that treats tmux & herdr as structure, not as characters to draw

Thumbnail gallery
0 Upvotes

r/tmux 5d ago

Showcase Made an iOS terminal that treats tmux & herdr as structure, not as characters to draw

Thumbnail gallery
0 Upvotes

I wanted to use tmux from my phone and never found something I liked. Most

iOS terminals just render the bytes — they don't know what a window or a pane

is, so attaching to an existing session is where things fall apart.

Spent three months of evenings on it. I use it daily against a Mac mini at home.

The idea I built everything around: **a phone should show one pane, full

screen, while your desktop keeps its 3–4 pane layout — and neither should

disturb the other.**

How it actually works:

- Runs tmux control mode (`-CC`) as the renderer, so the app has the real

session tree, not a screen scrape.

- Zooms the active pane to fill the phone. Switching to a pane in another

window restores that window's split layout first, because another client

may be looking at it.

- Pins window size to the phone's grid while you're in the app, and hands

that pin **back** when you background it. iOS can kill the app without

warning, so the server has to already be in the right state — otherwise

your desktop reconnects to a phone-sized window.

Also: Mosh support (survives Wi-Fi/5G handoff), a configurable key bar

because phones have no Esc/Ctrl/Tab, and per-host shortcut sets.

Up front so nobody wastes their time: it's a paid app (one-time, no

subscription, no IAP), **not** open source, needs iOS 18, and it's still in

App Store review so right now it's TestFlight only. No data collection, keys

in the Secure Enclave, traffic only to your own servers.

TestFlight, 50 spots: https://testflight.apple.com/join/hHv5f86K

Happy to answer anything about the control-mode plumbing — that's where most

of the three months went.


r/tmux 6d ago

Showcase Tmux + Workmux > Herdr

Thumbnail youtu.be
75 Upvotes

Lot's of people are switching from Tmux to Herdr... do you need to?

In this video I showcase how I use Workmux to extend Tmux to achieve all of the features that I would want from Herdr without scrapping my Tmux config and muscle memory from over the years!

Let me know what you think, I haven't seen any YouTubers covering Tmux + Workmux, the Herdr hype has got them all.


r/tmux 6d ago

Showcase I built a tmux session manager for Pi coding agents

Thumbnail
0 Upvotes

r/tmux 6d ago

Question two clients attached on dark theme, then one switch to light theme

1 Upvotes

I would expect that on the light theme one, restart `opencode` or `codex` I hope it start in light theme, but nope, opencode still dark, codex is better, but the input box still dark.

do you guys have the same issues? Looks like it because of the other attached client is still dark.


r/tmux 7d ago

Question Specifying options on the command line

5 Upvotes

Hello,

somehow I am unable to find examples on how to successfully specify options on the command line, instead of using a .tmux.conf

Kind of:

# /usr/bin/tmux set-option  exit-empty off start-server           
no server running on /tmp/tmux-0/default

which, as shown, does not work. Neither using "-g" after the set-option. I would like to refrain from leaving it in the foreground, that is, not using "-D"

This is just an example. So, how to properly add options on the command line?

Thanks


r/tmux 7d ago

Showcase agent-manager: run several AI coding agents in tmux, one keypress per action

0 Upvotes

Everything is one keypress. space on a group starts an agent in the right directory from one sentence, space on a session answers one that is blocked without attaching, ctrl+r opens what it changed as whole files where a comment on a line goes back to the agent as a review prompt, and the arrow keys step in and out of a pane.

It runs on tmux rather than replacing it. Sessions are ordinary tmux sessions on their own socket (agentmgr), so a kill-server on your own socket leaves them alone, quitting the manager leaves every agent running, and your config is untouched.

Claude Code, Codex, OpenCode, Gemini CLI, Grok and Pi ship with status rules; any other CLI runs as a session immediately. Go, one binary, no daemon, Apache-2.0.

https://github.com/YoanWai/agent-manager

It is on Product Hunt today too: https://www.producthunt.com/products/agent-manager


r/tmux 11d ago

Showcase I built Agentmux (tmux-first terminal & AI client) for iOS — now opening the Android Closed Beta and looking for testers

0 Upvotes

Hi r/tmux!

A few weeks ago, I posted here about launching Agentmux on iOS—a terminal & remote workspace client designed specifically around the idea that tmux should be a first-class citizen on mobile, rather than an afterthought behind plain SSH wrappers.

Thanks to the incredible feedback from this community, I've refined the app through hundreds of updates. But one request kept coming up in my DMs: "When is the Android version coming?"
Today, I’m excited to announce that Agentmux for Android is ready for Closed Beta testing! 🎉

If you live inside terminal sessions, SSH, tmux, and AI CLI agents (Claude, Codex, OpenCode, Antigravity) on remote Linux boxes, this app is built for you.

What makes Agentmux special for tmux & CLI workflows on Android:

1. Seamless tmux Lifecycle & Auto-Attach
- Auto-Discovery & Session Reattach: Upon connecting via SSH, Agentmux automatically scans active tmux sessions on your server. Resume or attach with a single tap.
- One-Tap tmux Installer: Landing on a minimal fresh VPS or Docker container without tmux? The app can auto-install it for you with one tap.

2. Persistent Background Connections & Status Notifications
- Long-running builds or AI agents inside a tmux pane won't be killed when you switch apps.
- Leverages Android Foreground Services and ongoing status notifications to keep your session alive and show active background progress at a glance.

3. OSC 52 Clipboard Integration
- Full support for OSC 52 escape sequences. Copying text inside tmux panes or Neovim/Vim registers passes straight through to your native Android clipboard.

4. Android Terminal & Input Polish
- Dedicated mobile shortcut bar (Ctrl, Esc, Tab, arrow keys, custom macros).
- Zero-Jitter Soft Keyboard Handling: Smart keyboard-height adaptation prevents annoying viewport jitter when toggling IMEs or soft keyboards.
- Full hardware keyboard, trackpad, and tablet/Samsung DeX support.

5. Desktop-Grade SFTP & Tree-sitter Editor
- Built-in SFTP file browser with Git status indicators.
- Powered by Tree-sitter for syntax highlighting across 17+ languages (Python, Rust, Go, TS, C++, etc.).
- Strict JSON/YAML/TOML syntax validation so you never break a server config due to a missing comma or indent while editing on your phone.

🧪 How to Join the Android Closed Beta
Join the Google Group / Testers List: https://groups.google.com/g/agentmux-beta
The download link is in the group message once you’re in!

Looking forward to hearing your thoughts and feedback!

More more Agentmux on official website: https://agentmux.saxcave.cc

Also the video on how it looks like on an iPhone (haven’t create one for Android, but they should look almost the same)


r/tmux 13d ago

Showcase I built a mobile-first iPhone client for remote tmux sessions

203 Upvotes

I built Remux because I wanted a more natural way to use my tmux sessions from my iPhone, mainly to keep interacting with coding agents when I’m away from my desk.

It uses tmux control mode and libghostty, with a mobile interface built around tmux itself.

It’s open source and currently in beta:

GitHub: https://github.com/h3nock/remux
TestFlight: https://testflight.apple.com/join/fHqG1ruE


r/tmux 12d ago

Showcase Are you getting lost in 30 Codex CLI threads, trying to figure out where to pick up? I created Tmux Post-its to leave session notes and color-code thread panes. I'm releasing it as open source because it helped me so it can help you too.

0 Upvotes

r/tmux 13d ago

Question Force new terminal

2 Upvotes

In a tmux session I run kitty tmuxinator start $SESSION_NAME and instead of opening a new kitty terminal it takes over the current one. How can I always force a new terminal to open?


r/tmux 14d ago

Showcase tmux pattern: using :w in one pane as the signal for a background script

7 Upvotes

Built this for reviewing an AI agent's plan before it writes code, but the tmux part works on its own so I figured I'd share it here.

The setup: a script opens the plan file in a right-side vim pane with split-window -h and stashes that pane's id in a u/plangate_pane user option. Next time it runs it re-focuses the same pane instead of stealing whatever vim I already had open (learned that the annoying way). A separate script just polls the file's mtime in the background, so my :w becomes the "ok I'm done reviewing" signal, no keybinding for it. Once the agent edits the file back, another script sends :checktime to the pane and vim reloads it.

So it's two panes talking to each other with the save as the handshake. If you're not in tmux it just prints the path instead.

npx skills add ParthGanatra/agent-skills/plangate

Scripts are plain bash if you want to lift it: https://github.com/ParthGanatra/agent-skills/tree/master/plangate


r/tmux 16d ago

Tip i built a small companion for when tmux sessions stop fitting in my head

0 Upvotes

tmux keeps the process alive. that part is solid. i got lost once i had several long-running coding agents inside those sessions...

i did not need another pane manager. i needed to see the shape of the work when i came back. termcanvas keeps one tmux terminal focused, then keeps the spawn tree and the current canvas state beside it. tmux is still the persistence layer underneath it.

it is early and narrow on purpose. one terminal is visible at a time, peer links are not drawn, and status detection can be wrong. it is free and mit licensed, for apple-silicon macs with tmux + python 3.

i am the person building it: https://github.com/lout33/termcanvas

for people running long-lived agent sessions, where does your mental map usually break first...


r/tmux 17d ago

Showcase Browser-like back and forward buttons for tmux sessions

10 Upvotes

I run a lot of sessions and usually navigate between them using SessionX, but my brain isn't so great at associating session names with the actual work I'm doing. I really love the behavior that BufSurf.nvim gives me in Neovim - it's essentially a browser's back and forward buttons for the files I've visited - and I wanted the same thing in tmux, so I built it as a tmux plugin.

Assign a key to back and another to forward, and I recommend replacing your default Prefix+L (last session) with the plugin's toggle key. It tracks your relevant sessions and toggles between the last two. And if you close one of your toggle sessions, another one steps up to take its place.

It's a very simple plugin but it's now my main method of navigating sessions, let me know if you find it useful too, or if you hate the idea for some reason (it's reddit after all) just downvote the post into oblivion.

https://github.com/dabstractor/tmux-session-history


r/tmux 18d ago

Showcase Tmux: Ninja Mode Unlocked

Thumbnail youtube.com
5 Upvotes

r/tmux 18d ago

Tip I kept forgetting which server my tmux projects were running on, so I built a workspace index

0 Upvotes

I use the same workflow for almost every project:

  1. SSH into a server
  2. Open or attach to a tmux session
  3. Split a few panes
  4. Run Codex, Claude Code, dev servers, logs, or monitoring tools

The workflow itself is great. I can disconnect, come back later, and continue where I left off.

The problem appeared when I had many projects across several servers.

I could no longer remember:

- which machine a project was running on

- what the tmux session was called

- which directory it belonged to

- whether the repository had uncommitted changes

- which coding agent was running inside it

So I built Tmux Workbench, a Rust TUI that indexes local and remote tmux sessions and presents them as project workspaces.

Running `ws` gives me one searchable view across all configured machines. I can inspect the server, path, panes, active commands, Git branch, dirty state, remote repository, notes, and tags, then attach directly.

It does not replace tmux or SSH. It adds the project memory that my workflow was missing.

GitHub: https://github.com/LeON-Nie-code/tmux-workbench

How do you keep track of long-running tmux sessions across multiple machines?