tmux Troubleshooting Glossary
Direct, copy-able fixes for the 13 most common bugs: scrolling history, broken SSH agents, True Color rendering, and more.
1. Fix "Washed Out" Colors (True Color Support)
You spend hours configuring a beautiful Neovim theme, but when you launch it inside tmux, the background looks grayed out and the syntax highlighting is wrong.
The Solution
tmux only sends 24-bit (True Color) to your terminal when it knows the outer terminal supports it; otherwise it maps colours to the nearest of 256. tmux 3.6+ detects this automatically when COLORTERM=truecolor is set; on older versions, or terminals that do not set it, tell tmux yourself.
Ensure these two lines exist in your ~/.tmux.conf:
# TERM inside tmux: 256 colours + italics
set -g default-terminal "tmux-256color"
# Outer terminal supports RGB (tmux 3.2+)
set -as terminal-features ",xterm*:RGB"
Check what tmux detected with tmux info | grep -E "RGB|Tc" (run it inside tmux). If your terminal sets a different $TERM (for example alacritty or xterm-kitty), use that name instead of xterm*. On tmux older than 3.2 use set -as terminal-overrides ",xterm*:Tc". Use screen-256color only on old systems with no tmux-256color terminfo entry.
2. Fix Vim / Neovim `Escape` Key Delay
When you press Escape to leave Insert mode in Vim, there is a frustrating half-second pause before the cursor responds.
The Solution
This delay happens because the Escape key is the first character in many terminal "escape sequences" (like the arrow keys). Before tmux 3.5, tmux waited 500 milliseconds by default to see if another keystroke follows the Escape key; tmux 3.5 and newer wait only 10 milliseconds, so this lag usually means an older tmux or an escape-time line in your config.
Set escape-time to 10 milliseconds (check the current value with tmux show -s escape-time). Avoid 0 if you work over slow SSH links, where Escape-prefixed keys such as Alt combinations can be split:
# Remove delay for exiting insert mode with ESC in Neovim
set -sg escape-time 10
3. SSH Agent Broken Upon Reconnecting
You detach from your tmux session, go home, and SSH back in. When you reattach, Git pushes and remote SSH commands fail maliciously with Permission denied (publickey).
The Solution
Every shell inside tmux keeps the $SSH_AUTH_SOCK value it started with. When you reconnect, SSH creates a new agent socket and the old path is dead. tmux's update-environment option copies the new value into the session when you attach, but only programs started after that see it; shells that were already running keep the stale path.
The robust fix is a fixed symlink that SSH refreshes on every login, plus telling tmux to always use that symlink. The second step must also remove SSH_AUTH_SOCK from update-environment, or tmux overrides the symlink on attach (we tested this on tmux 3.7c).
# Every time you SSH in, symlink the active socket to a fixed path
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi
# Stop tmux replacing SSH_AUTH_SOCK on attach (default list minus SSH_AUTH_SOCK)
set -g update-environment "DISPLAY KRB5CCNAME SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
# Every new pane uses the symlink
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
4. Terminal "Frozen" (No Keyboard Input)
You are typing quickly, and suddenly the terminal stops responding. You can't type anything, and the screen is completely frozen, leading you to believe that the tmux server has crashed.
The Solution
You accidentally pressed Ctrl+s, which is the legacy terminal command for XOFF (Flow Control), instructing the terminal to stop processing output.
Press Ctrl+q (XON) immediately to unfreeze the terminal. To prevent this entirely in the future, disable flow control in your shell configuration profile.
# Disable terminal flow control (Ctrl+s hang)
stty -ixon
5. Commands Not Found ($PATH Issues)
You run a command like npm or rvm in your normal terminal perfectly. But when you create a tmux window, bash responds with command not found.
The Solution
By default tmux starts every pane as a login shell (the default-command option is empty), so your profile files run again in each pane. On macOS, /etc/zprofile runs path_helper, which reorders $PATH and can push version-manager paths (nvm, pyenv, rbenv, Homebrew) behind the system ones, so the wrong tool, or no tool, is found.
Start panes as ordinary interactive shells instead, so they inherit the $PATH of the terminal that started tmux. Then restart the server (tmux kill-server) because existing panes keep their old environment.
# Start non-login shells that inherit your PATH
set -g default-command "${SHELL}"
6. Fix macOS Clipboard (pbcopy / pbpaste)
You highlight text in tmux copy-mode, press y to yank it, but when you go to paste it into a web browser, your system clipboard is empty.
The Solution
Modern tmux handles this via the copy-pipe command. You must explicitly tell tmux to pipe the copied text output into the native macOS clipboard daemon, pbcopy.
# Use vi keys in copy mode
setw -g mode-keys vi
# Bind 'y' to pipe selection to macOS clipboard
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
Linux Users: Replace pbcopy with xclip -in -selection clipboard or wl-copy (for Wayland). Alternately, use the tmux-yank plugin, which handles OS detection automatically.
7. Missing Undercurls / Squiggly Lines (Neovim)
LSP diagnostics and spellcheck in modern Neovim rely on colored undercurls (squiggly underlines) to denote errors. In tmux, these degrade to standard white underlines or disappear completely.
The Solution
Undercurls use the Smulx and Setulc terminal capabilities. tmux only uses them when it knows the outer terminal supports them. On tmux 3.2+ one line enables the built-in usstyle feature; the two manual overrides below do the same on older versions.
# tmux 3.2+: undercurl + coloured underlines
set -as terminal-features ",xterm*:usstyle"
# Older tmux: undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# Support for colored underlines
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
💡 Looking for a full Neovim setup? Read our dedicated Neovim + tmux Integration Guide for seamless Ctrl-hjkl split navigation, OSC 52 clipboard sharing, and zero escape lag.
8. Cannot Copy Text Normally in Mouse Mode
Getting unknown command: new-pane instead? That is tmux 3.6 or older; see the floating panes guide. Otherwise: you enabled set -g mouse on to scroll smoothly, but now when you click and drag over text you want to quickly copy from a pane, it selects entire rows across splits instead of just the text you want.
The Solution
When mouse mode is enabled, tmux intercepts all mouse events. To bypass tmux temporarily and use your outer terminal emulator's native text selection tooling, you must hold down a modifier key.
Most terminals (GNOME Terminal, Konsole, Windows Terminal, Alacritty, Kitty, WezTerm, Ghostty): hold Shift while clicking and dragging.
iTerm2: hold Option. macOS Terminal.app: hold Fn.
9. Strange Characters & Rendering Issues
Pane borders look like rows of "q", "x", and "j" characters, or emojis / powerline font icons are failing to render properly.
The Solution
tmux decides whether to send UTF-8 by looking at LC_ALL, LC_CTYPE and LANG. If none says UTF-8 (common on fresh servers and in Docker), borders fall back to line-drawing codes that some terminals show as letters. The proper fix is a UTF-8 locale, for example export LANG=en_US.UTF-8 in your shell profile; tmux -u forces UTF-8 output as a quick workaround.
Launch tmux explicitly with the -u flag from your shell, or alias it in your ~/.bashrc or ~/.zshrc:
# Force tmux to assume the terminal supports UTF-8
alias tmux="tmux -u"
10. Rebinding Default Prefix Issues
You tried to change the default Ctrl+b prefix to Ctrl+a, but now neither of them work correctly, or the new prefix isn't passing through to embedded applications.
The Solution
When changing the prefix in tmux, you must explicitly clear (unbind) the old prefix to prevent collisions, set the new prefix, and rebind the send-prefix command so you can pass the key combination to other terminal apps (like Vim or nested shell jobs).
# Unbind default prefix
unbind C-b
# Set new prefix to Ctrl+a
set -g prefix C-a
# Ensure that we can send Ctrl+a to other apps (pressing it twice)
bind C-a send-prefix
11. Configuration File Changes Not Applying
You copy-pasted a snippet into ~/.tmux.conf, saved the file, and closed your terminal. You open a new terminal window, but the changes aren't there.
The Solution
Tmux is a client-server architecture. Closing a terminal merely detaches the client; the underlying server never restarted, and therefore it never re-read the configuration file.
You can force the live server to re-evaluate the config file without killing it by using the source-file command.
# Press Prefix (Ctrl+b), then type colon ":" to enter the command prompt
:source-file ~/.tmux.conf
# Press Prefix + r to quickly reload the config file
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
12. Controlling Nested tmux Sessions
You have a tmux session open on your laptop. Inside a pane, you SSH into a remote server, and open tmux there. Now you have "tmuxception". When you press your prefix to create a pane, it splits your outer laptop session, not the internal server session.
The Solution
The outermost tmux server always intercepts the prefix key first. To send the prefix command to the "nested" inner session, you must press the configured send-prefix sequence.
If your outer session uses the default Ctrl+b prefix, press the prefix twice: Ctrl+b Ctrl+b (the default binding for send-prefix), then the key, e.g. Ctrl+b Ctrl+b c. The first stroke is swallowed by the outer session, and it passes the second stroke down the pipe to control the remote session.
# If your prefix is Ctrl+a, bind Ctrl+a to send the prefix key inward
bind C-a send-prefix
13. How to Scroll Up (History & Mouse)
You try to use your terminal's scroll bar or mouse wheel to see previous output, but it either does nothing or scrolls your command history instead of the terminal buffer.
The Solution
tmux draws everything itself, so your terminal's own scrollback only holds tmux's screen, not each pane's history. You must either use Copy Mode to scroll with the keyboard or enable Mouse Mode to use your wheel.
# Add this to ~/.tmux.conf to enable mouse wheel scrolling
set -g mouse on
# 1. Enter "Scroll Mode" (Copy Mode)
Press Prefix then [
# 2. Navigate history using keys
Use ↑ ↓ or Page Up Page Down
# 3. Exit back to prompt
Press q
Shortcut: Prefix PgUp enters copy mode and scrolls up a page in one step. On tmux 3.6+, set -g pane-scrollbars modal shows a scrollbar while you scroll. Keep more history with set -g history-limit 50000 (default 2000 lines).