r/tmux

▲ 2 r/tmux

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

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

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:
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.

reddit.com
u/mandrulee — 3 days ago
▲ 6 r/tmux

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

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)

u/jhen_jie — 2 days ago
▲ 154 r/tmux+10 crossposts

100 stars. I know that's nothing by internet standards, but I genuinely didn't expect anyone outside my own GitHub profile to care about this.

Kairo started as a frustration project. I was deep in a coding session, had to context-switch to my task manager, and just... snapped a little. Opened a new Go module that same night. That was a few months ago.

For those who haven't seen it — Kairo is a fully local, keyboard-first terminal task manager. SQLite storage, 32 themes, fuzzy search, natural language deadlines, a Lua plugin system, a CLI API for scripting, and an optional MCP server if you want to point AI agents at your task list. No cloud. No account. No subscription. Just a binary you run in your terminal.

Things I didn't expect when building it:

  • That people would actually use the Lua hooks (shoutout to the person who built a webhook notifier with them — genuinely wild)
  • That the "32 themes" feature would be the thing people mentioned most
  • That u/Tornado300 would show up and fix bugs I'd been avoiding for weeks

What's coming: encrypted multi-workspace support, a sandboxed plugin environment, and smarter task suggestions. I'm building this in the open and taking feedback seriously — if something annoys you, open an issue or just tell me here.

If you've been looking for a task manager that lives where you actually work — give it a shot.

github.com/programmersd21/kairo

Thanks for the stars. They matter more than they probably should.

u/Klutzy_Bird_7802 — 5 days ago
▲ 76 r/tmux

Tmux + Workmux > Herdr

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.

youtu.be
u/smnatale — 9 days ago
▲ 0 r/tmux+1 crossposts

I built a tmux session manager for Pi coding agents

https://preview.redd.it/glxv881hkyih1.png?width=2880&format=png&auto=webp&s=9eb7580f4d89aaa3ad4f19de711b7bbed0dbb4e5

I built **tmux-pi-session-manager**, a small tmux plugin for managing multiple [Pi](https://github.com/badlogic/pi-mono) coding agents running across different projects.

The main reason I made it was because I often have several agents running at the same time, and switching between tmux sessions and figuring out which agent needs attention gets annoying.

It provides:

* 🔎 Automatic discovery of Pi agents running inside tmux

* 📂 Multiple agents per project/directory

* 📊 Live `WORKING / WAITING / BLOCKED / ERROR / IDLE` status

* 🔔 Desktop notifications when an agent needs attention

* 🎯 An `fzf` picker with live terminal previews

* ⚡ Quick jump between agents

* 🗑️ Safe agent/session killing

* 🖥️ `pi-tmux` CLI for managing agents from the shell

* 🚫 No daemon and no terminal-output parsing — it uses Pi's native extension events

The idea was inspired by `tmux-claude-session-manager`, but this implementation is built specifically around Pi's extension/event APIs.

If you're running multiple Pi agents in tmux, I'd love to hear how you manage them.

Repo: [github.com/x0d7x/tmux-pi-session-manager](https://github.com/x0d7x/tmux-pi-session-manager)

reddit.com
u/SilverRefrigerator90 — 8 days ago
▲ 3 r/tmux

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

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!

reddit.com
u/GimmeIdeaForUsername — 7 days ago
▲ 0 r/tmux

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

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

reddit.com
u/khalon23 — 9 days ago
▲ 3 r/tmux

Specifying options on the command line

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

reddit.com
u/hiradne — 9 days ago
▲ 9 r/tmux+4 crossposts

Session pet : a menu-bar pet that shows which claude code sessions need your attention - Free

I run like 4-5 claude sessions at once for differnet repos and I kept running into same annoying thing like one of them needs input, another needs some approval, but im headsdown doing a PR review while my sessions are working and i don't notice. By the time I get to it, it was a very simple approval I should have given sooner or I have to constantly check/keep on eye on them while they are running. Even with notifications there's a cost to switching from ur current screen/view to another one , giving approvals and then coming back.

It was annoying that I build a menu bar for it to keep track of all the running sessions , so if any of them needs me I can just answer right from there (approve/deny or pick an option, whatever it's asking) without actually switching screens.

macos + tmux only right now. Free, source's up if anyone wants to use it: github.com/Abbeyme1/session-pet

Been using it for a few days now and its helping. Mostly just curious if anyone else running multiple sessions deals with this or if it's just a me thing lol

u/HelpAny4374 — 13 days ago
▲ 6 r/tmux+1 crossposts

tmux-resurrect's autosave can fail silently, and unthrottled boot restore can OOM a Pi

tmux-resurrect + continuum bit me twice, both in ways that only show up after it's too late to do anything about it:

  1. Autosave can fail silently. No error or logs, you just find out on the next restore that the file's empty or half-written.

  2. Boot restore has no throttling. Continuum relaunches every saved session back-to-back with no delay. On a resource-constrained box (mine's a Pi) with 10+ heavy panes, that's enough to OOM it or hang SSH mid-restore.

What's worked for me: guarded saves every 5 min that get rejected if they're empty/half-written, plus a boot restore that brings sessions back one at a time with a delay between each. Runs as a systemd service, no login needed, survives reboot.

https://github.com/nahidspace/tmux-alwayson

If you've hit either of these, curious how you worked around it.

u/Altruistic_Pipe4409 — 12 days ago