When attempting to use iTerm2's tmux Control Mode integration with a remote server, the connection hangs with this error:
Slow tmux Response
It's taking a long time for tmux to respond. If this is an old or funky system it
might expect newline rather than carriage return to end commands. You can adjust
the line terminator used by tmux integration in Settings.
- OS: macOS
- tmux version: 3.3a
- iTerm2: Latest version
- Connection: SSH to remote server
- Command:
ssh remote-host -t tmux -CC new-session -A -s session
The issue is caused by tmux plugins (specifically tmux-claude-status and TPM - Tmux Plugin Manager) interfering with iTerm2's Control Mode protocol communication.
Control Mode uses special control sequences that plugins' daemon monitor scripts can disrupt.
These commonly suggested fixes did NOT resolve the issue:
- ❌ Enabling "Send \n rather than \r to terminate commands" in iTerm2 → Preferences → Profiles → Terminal
- ❌ Enabling "Automatically bury the tmux client session" in iTerm2 → Preferences → General → tmux
- ❌ Changing
escape-time 0toescape-time 10in~/.tmux.conf - ❌ Restarting tmux server
- ❌ Killing and recreating sessions
Backup your current config:
ssh remote-host 'cp ~/.tmux.conf ~/.tmux.conf.backup'Create a minimal config WITHOUT plugins:
ssh remote-host 'cat > ~/.tmux.conf << '\''EOF'\''
set -g history-limit 100000
set -g mouse on
set -s escape-time 10
set -g status-right-length 100
EOF'ssh remote-host 'tmux kill-server'This forces tmux to reload the configuration on next start.
ssh remote-host -t tmux -CC new-session -A -s mysessionIt should now connect immediately without hanging!
The problematic configuration typically looks like:
# ❌ This causes the hang:
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'samleeney/tmux-claude-status'
run '~/.tmux/plugins/tpm/tpm'
# These daemon scripts interfere with Control Mode:
if-shell "test -f ~/.tmux/plugins/tmux-claude-status/tmux-claude-status.tmux" \
"run-shell ~/.tmux/plugins/tmux-claude-status/tmux-claude-status.tmux"When these run, background daemon processes interfere with iTerm2's Control Mode protocol.
If you want your plugins back, you have options:
ssh remote-host -t tmux attach -t mysessionPlugins work fine with regular tmux mode.
Create two configs:
~/.tmux.conf- Minimal (for Control Mode)~/.tmux-full.conf- With plugins (for regular mode)
Use regular tmux when you need plugins:
tmux -f ~/.tmux-full.conf attachIf you want to identify which specific plugin causes issues:
- Start with minimal config
- Add TPM only (without tmux-claude-status)
- Test if Control Mode works
- Add other plugins one at a time
ssh remote-host 'ps aux | grep tmux'Look for daemon monitor scripts or background processes.
ssh remote-host 'cat ~/.tmux.conf'ssh remote-host 'tmux list-sessions'While these didn't fix the plugin issue, they're recommended for Control Mode:
Preferences → General → tmux:
- ✅ Check "Automatically bury the tmux client session after connecting"
- Choose "When attaching, restore windows as": Native windows
Preferences → Profiles → Terminal:
- ✅ Check "Send \n rather than \r to terminate commands" (for compatibility with some systems)
- iTerm2 tmux Integration Documentation
- tmux Control Mode Wiki
- iTerm2 tmux Best Practices
- GitHub Issue
Problem: tmux plugins cause iTerm2 Control Mode to hang
Solution: Use minimal tmux config without plugins
Alternative: Use regular tmux mode (without -CC) if you need plugins
The key insight is that iTerm2's Control Mode requires a clean communication channel with tmux, and background daemon processes from plugins interfere with this protocol.