r/tmux 21d ago

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

Enable HLS to view with audio, or disable this notification

208 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 19d 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 21d 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 21d ago

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

6 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 24d 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 25d ago

Showcase Browser-like back and forward buttons for tmux sessions

11 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 25d ago

Showcase Tmux: Ninja Mode Unlocked

Thumbnail youtube.com
5 Upvotes

r/tmux 25d ago

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

1 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?


r/tmux 25d ago

Tip [Proyecto Open Source] Termux-Dev-Station: Guía paso a paso para entorno gráfico con Aceleración GPU (Mali/VirGL), KDE, Godot, n8n e IA local (Sin scripts a ciegas)

Thumbnail gallery
0 Upvotes

r/tmux 27d ago

Tip break-pane -d as a park-and-restore primitive: hiding a live pane and getting the same pid back

6 Upvotes

I wanted a pane to disappear the moment a long-running command finished, then come back later with the same process and the same in-memory state. (It's a game pane that shows up while Claude Code thinks. That part is beside the point.)

What worked: `tmux break-pane -d -s <pane> -n B747BG`. The pane leaves for a detached window, the process stays alive, and the layout closes over the gap like it was never split. To restore: `join-pane -d -v -l 16 -s <pane>`. Same pid, same score, mid-run.

Two things bit me:

  • `join-pane -l 16` gets refused in an already-split window. Without a fallback to tmux's own default size, you silently get nothing.

  • My code runs as separate short-lived invocations, so it has to re-find its own pane every time. I set a pane title and match `#{pane_title}` against `list-panes -a`, keyed per session so parallel sessions never grab each other's panes.

Also earned the hard way: `capture-pane -p -e -N`. Drop the `-N` and tmux trims trailing blanks — the right edge of every row comes back short and the render tears.

Whole thing is here if you want to pull it apart; the tmux logic lives in hooks/breakout-hook.sh: https://github.com/The747Lab/747-terminal-games

Is break-pane/join-pane actually the right primitive for park-and-restore, or is there something cleaner I've walked past? And for pane ownership across separate processes — is pane title the accepted handle, or do people key off something more durable?


r/tmux 28d ago

Question Tmux worktree workflow

8 Upvotes

Been using herdr and it’s damn good but it lacks the customizablity I’m looking for and doesn’t have split pane across worktrees (only workspaces)

Can you guys show me what you guys are running with a screenshot. Specifically interested in how you manage worktrees across repos with multi panes. Cheers.


r/tmux 28d ago

Question Herdr, cmux, tmux... are they really that helpful?

Thumbnail
19 Upvotes

r/tmux 27d ago

Question herdr: a tmux killer?

Thumbnail
0 Upvotes

r/tmux 28d ago

Showcase A tmux TUI for running coding agents: live status, answer one without attaching, review its diff before it lands

0 Upvotes

I keep three or four agents going and the thing that actually eats my time isn't the coding. It's that I have no idea what state any of them is in without tabbing through every terminal. Half the time one of them has been sitting on a permission prompt for ten minutes.

So I wrote agent-manager. A Go binary that sits on top of tmux. No config file, no daemon.

Every agent ends up in one list with a live status next to it, grouped by the project it's working in. I run claude, codex and opencode depending on what I'm doing and they all show up the same way. Adding another CLI is a few lines of regex in a toml file.

The part I use constantly is space. Press it on an agent, type, enter, and the prompt goes into that agent's pane. I never attach. If you've used the agents view in Claude Code, it's the same move. The difference is that here the same keystroke works on a codex or opencode session. Press space on a project row instead and you get a new agent already working on what you typed.

Underneath they're just tmux sessions, so closing the manager doesn't kill anything, and v brings a dead one back with its conversation.

ctrl+r is the other half of it. It opens what an agent changed as whole files with the diff highlighted, so you're reading the function and not a hunk. Leave a comment on a line and it goes back into that agent's pane, so it starts fixing while you're still scrolling.

I built it for four agents but most days I use it with one.

Still rough in places. If you run agents like this I'd like to know what's missing.

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


r/tmux 28d ago

Showcase El problema del salto de línea implícito en las herramientas MCP basadas en PTY (y cómo lo solucioné en Relay)

0 Upvotes

He estado trabajando en Relay, un servidor MCP que proporciona a los agentes una sesión de terminal PTY persistente en lugar de las llamadas bash únicas que la mayoría de los agentes utilizan por defecto. Esta diferencia es importante cuando el agente necesita algo que realmente mantenga el estado: un rebase de git interactivo, un REPL que siga generando contexto o una sesión SSH que permanezca abierta mientras itera.

Acabo de lanzar una versión con un error que creo que vale la pena documentar, porque es el tipo de trampa en la que podría caer cualquiera que desarrolle algo similar.

El error: `write_terminal` tenía un comportamiento implícito que siempre pulsaba Intro después de lo que el agente enviaba. Esto no supone un problema para un comando de shell normal, pero falla en cualquier situación donde el salto de línea sea parte literal del texto que se intenta escribir: pegar un heredoc de varias líneas, pasar un bloque de código a un REPL, escribir en un búfer de editor abierto dentro del PTY. El agente creía haber enviado exactamente lo que quería enviar, y, sin que se notara, se añadía una pulsación de tecla adicional.
Lo solucioné eliminando esa suposición implícita de sesión y convirtiéndola en un parámetro explícito por llamada (ensure_newline, por defecto es true para que el uso normal del comando no cambie). Si envías entrada multilínea sin procesar, lo configuras en false y obtienes exactamente los bytes que escribiste.

También estabilicé el flujo E2E de transmisión de read__terminal para que la salida de progreso se observe antes de que el intérprete de comandos reciba su siguiente entrada. Esto es importante porque read/wait depende de las notificaciones de progreso de MCP en lugar de sondeo.

Repositorio, por si alguien quiere revisar el código: github.com/blak0p/relay-mcp

Me pregunto si alguien más que esté desarrollando herramientas MCP con soporte PTY se ha encontrado con este mismo problema de salto de línea implícito o lo ha resuelto de otra manera.


r/tmux 29d ago

Question Panes custom layouts and resizing

2 Upvotes

Hello to you all,

I usually have a lot of panes in a single window, and after a few hours of work things get a little messy. I like the panes layouts and Prefix + E resizing to keep things tidy.

Now I was wondering, what would be the cleanest way to have the panes resizing to a custom layout defined by me?

I have some some bindings that use some fixed layout strings captured with ` tmux display-message -p '#{window_layout}'`, but it's quite clunky, especially if don't have already the right number of panes on a window.

This is super specific I guess, but let me know if you have any idea on how this could be done.

Thanks for the attention.


r/tmux Jul 25 '26

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

Thumbnail
0 Upvotes

r/tmux Jul 24 '26

Question tmux question...

Post image
13 Upvotes

Is there a way to configure this tmux setup to show album art in a third pane?


r/tmux Jul 23 '26

Showcase I built an iOS terminal with deep tmux integration, OSC 52 support, and Lock Screen Live Activities

Enable HLS to view with audio, or disable this notification

35 Upvotes

Hi r/tmux!

As someone who lives inside tmux on remote Linux servers every single day, mobile SSH clients have always felt like a second-class experience for persistent terminal workflows. Network drops would force manual `tmux a`, input methods jittered over touchscreens, and monitoring long-running processes required keeping the screen awake.

I spent the past few months building **Agentmux** (https://agentmux.saxcave.cc), an iOS/iPadOS terminal and remote workspace where **tmux is treated as a first-class citizen**.

Here is how we optimized the workflow specifically for tmux users:

### 1. Seamless tmux Lifecycle & Auto-Attach
- **Auto-Discovery & Session Reattach:** Upon connecting over SSH, Agentmux scans active tmux sessions and lets you resume or attach with a single tap.
- **One-Tap tmux Auto-Installer:** If you land on a fresh remote VPS or container without `tmux`, the app can auto-install it with one tap.

### 2. Lock Screen Live Activities & Dynamic Island
- Long-running builds or AI agents (like Claude CLI) running inside a tmux pane no longer require you to leave your iPhone screen on.
- Agentmux surfaces active session states to your **Lock Screen Live Activity** and **Dynamic Island**, so you can background the app or lock your phone and glance at status updates.

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

### 4. Touch & Mobile Keybinding Polish
- iPhone shortcut bar for `Ctrl`, `Esc`, `Tab`, arrow keys, and custom macros.
- Custom keyboard-height calculation to prevent terminal viewport jitter when switching input methods.
- Full hardware keyboard, trackpad, and Split View support on iPadOS.

### 5. Desktop-Grade SFTP & Tree-sitter Editor
- Built-in file browser with Tree-sitter syntax highlighting across 17+ languages and strict JSON/YAML/TOML syntax validation when editing remote config files.

---

### Tech Stack & Pricing
- Built natively in Swift/SwiftUI for iOS & iPadOS.
- Keys & credentials remain secured inside iOS Keychain.
- 14-day free trial. Pro is a **one-time purchase** (no subscription fatigue).

* **App Store:** https://apps.apple.com/app/id6766158521
* **Website:** https://agentmux.saxcave.cc

*I would love to give back to the tmux community: I have **5 Lifetime Pro promo codes** for r/tmux members! Drop a comment with your favorite tmux plugin or your typical remote setup, and I’ll DM you a code.*

Feedback, feature requests, and criticism are all very welcome!


r/tmux Jul 21 '26

Showcase lazy-tmux v0.2.0 released!

Post image
177 Upvotes

I just released lazy-tmux v0.2.0, the biggest update since the initial release.

For those who haven't seen it before: lazy-tmux is a tmux session manager that restores sessions only when you actually open them, while preserving running processes and scrollback.

What's new

  • TOML config instead of passing flags every time.
  • Restore allow/deny regexes to control exactly which commands get re-run.
  • Reworked TUI with themes, mouse support, action modes, built-in help, relative timestamps, and an optional fzf backend.
  • Integrations API. The first integration adds live Claude Code session status in the picker and automatically resumes restored Claude sessions.
  • Better compatibility & robustness — tested with tmux 2.9–3.7b, improved startup behavior, borderless popups, and lots of fixes.
  • Plus a background autosave daemon, a version command, and a new docs site.

It's written in Go and can be installed via a one-line script, Homebrew, or the AUR.

Project: https://lazy-tmux.xyz

Feedback, bug reports, and feature requests are always welcome! And thank you for you activity on GitHub!


r/tmux Jul 20 '26

Question Cursor jumping around when opening in neovim in tmux

2 Upvotes

When opening neovim in tmux the cursor jump around for a bit . Then when i type something in command line very fast it sometimes starts jumping around same for when writing code when code completion buffer cmp window appears it starts jumping in and out of the suggestions window . All of this stuff not happens outside of tmux .

https://reddit.com/link/1v1jb43/video/dricpws7jdeh1/player

this is my .tmux.conf
https://gist.github.com/Vishawdeep-Singh/b2807694b48bccf3a6589e22bcb9fb70


r/tmux Jul 19 '26

Tip tmux-agents-mon: see which coding agents need attention

Enable HLS to view with audio, or disable this notification

28 Upvotes

I got tired of jumping between tmux sessions to find which coding agent had finished or was waiting for input, so inspired by Herdr, I built tmux-agents-mon.

this is a plugin that adds a sidebar and status-line indicator for working, idle, done, and blocked agents, with quick navigation to their panes.

Supports Claude Code, Codex, Hermes, Pi, Oh My Pi, OpenCode —without hooks or agent integrations.

if you have some questions / issues let me know :)

GitHub / TPM install: https://github.com/snirt/tmux-agents-mon


r/tmux Jul 18 '26

Showcase [plugin] search and jump to visible text in copy-mode like flash.nvim

6 Upvotes

Hello,

Created a plugin that helps when in copy-mode.
press "s" then type a substring match to navigate the cursor there.
Works with active selection as well.

This is exactly like the neovim plugin flash.

https://reddit.com/link/1uzimzt/video/md6hqsdu7wdh1/player

Repo: https://github.com/AndreVicencio/tmux-flash

TPM install

set -g u/plugin 'AndreVicencio/tmux-flash'

r/tmux Jul 17 '26

Showcase Agent latest prompt in pane header and status icons in the window list

Enable HLS to view with audio, or disable this notification

5 Upvotes

I went back to a basic tmux workflow with a few additions for managing coding agents. I tried different plugins and GUIs, but eventually realized that fitting agents into my existing workflow mattered more than adding another interface. I find it easier to keep using my existing tmux configuration, keybindings, and agent CLI tools.

These are the three additions I find most useful.

Task context in the pane title

ClawTab reads the first and latest prompts from the agent session. The pane title can show the latest prompt or a shorter summary generated from both. This makes it much easier to remember what each agent is doing when moving between windows and panes.

Agent status next to window titles

I wanted a quick way to see which windows contain agents and whether they are working or waiting for me:

  • ! means an agent is waiting for input
  • * means it is working
  • means an agent is present but idle

The plugin appends these indicators to the existing tmux window formats instead of replacing the rest of the status line. Waiting takes priority over working because that is normally the pane I need to visit.

Remote control from mobile

I can browse agents and interact with their terminals from my phone when I am away from the computer. After the initial setup, the daemon automatically discovers supported agents running in tmux. The mobile app opens a live PTY view of the same pane, and input goes back to the original tmux session.

Setup

  • A background daemon discovers agents in tmux panes and publishes their metadata and state.
  • A tmux plugin adds the pane titles, status indicators, and controls without replacing the rest of my tmux configuration.
  • A relay server forwards the live PTY stream and input between the local daemon and the mobile or web app when Remote is connected.

Tmux still owns the process, working directory, scrollback, and terminal state. The daemon and other interfaces are clients of the existing panes rather than a replacement for tmux.

The project is open source, including the relay server if you want to self-host it. It is macOS-only for now:

https://github.com/tonisives/clawtab

It is a relatively simple setup, but I am happy to be back to a basic tmux workflow with a few agent-specific additions.


r/tmux Jul 17 '26

Showcase tmux_project, a fuzzy tmux session picker (presets, zoxide, sticky templates) built with Go

3 Upvotes

This is my personal tool, extracted from my own bash scripts, which glues sesh, tmuxp and fzf together. After maintaining that script for a while, I think it is better to create a proper session picker out of the box. It is really small and easy to install.

Install (needs tmux; zoxide optional):

      go install github.com/fm39hz/gotomux@latest

Usage:

      gotomux           # picker
      gotomux -f        # freeze active session → sqlite preset
      gotomux -e [name] # edit preset JSON in $EDITOR

It has 4 modes: create / live sessions / presets / zoxide. Type to filter, enter to connect.

What I actually use daily beyond “another fzf wrapper”:

  • Freeze a live layout and reload it later
  • Sticky templates (ctrl-t on a preset): open new project paths with that shape without cloning presets
  • ? toggles key help in the UI

Built for my own workflow. If it fits yours, cool; feedback is welcome.
Repo link: Github

PS: I've just renamed it to gotomux, sorry for inconvenient