DEV Community

Charles Hasse
Charles Hasse

Posted on • Originally published at canvascode.app

tmux cannot tell you which of your AI agents stopped, and here is the one command that proves it

I put three agents in three tmux panes and asked tmux which one had stopped.

It could not tell me. That is not a bug, it is the design: silence is monitored per window, not per pane. A window with one busy pane reports itself healthy while the agent next to it is stuck.

Seven lines that reproduce it, on any machine with tmux:

tmux new-session -d -s mixed
tmux split-window -h -t mixed
tmux set-window-option -t mixed monitor-silence 5
tmux send-keys -t mixed.0 'while true; do echo tick; sleep 1; done' C-m
sleep 9
tmux list-windows -t mixed -F 'silence_flag=#{window_silence_flag}'
tmux kill-session -t mixed
Enter fullscreen mode Exit fullscreen mode

It prints silence_flag=0. One pane has been silent for nine seconds with a five second threshold, and tmux still calls the window healthy, because the other pane is still writing. monitor-silence is a window option and window_silence_flag is a window format. There is no per pane equivalent.

Which means the pane grid, the arrangement that looks best in a screenshot, is the one that hides a stalled agent best.

What works instead: one window per agent

Named windows are the unit tmux can watch individually, so give each agent its own:

tmux new-session -d -s agents -n api
tmux new-window  -t agents -n web
tmux new-window  -t agents -n docs

for w in api web docs; do
  tmux set-window-option -t "agents:$w" monitor-silence 60
done

tmux list-windows -t agents \
  -F '#{window_name}  #{?window_silence_flag,IDLE,working}  #{t:window_activity}'
Enter fullscreen mode Exit fullscreen mode

That last command is the closest thing tmux gives you to a status board:

api  working  Thu Aug 13 09:11:12 2026
web  IDLE  Thu Aug 13 09:11:04 2026
docs  working  Thu Aug 13 09:11:12 2026
Enter fullscreen mode Exit fullscreen mode

(that run used a 5 second threshold so web would trip while I watched)

Start the agent inside each window with tmux send-keys -t agents:api 'claude' C-m, run the list on a loop with watch, and you have one glance instead of a tour through panes.

What it still will not do

Silence is not the same as being stuck. An agent waiting for you to approve a file write is silent. An agent thinking for two minutes is silent. An agent that crashed is silent forever. tmux measures bytes on a terminal, so it cannot separate the three, and no built in alert knows the difference between "asked you a question" and "finished the job". The visual alert also needs a client attached; on a detached session the flag is still readable with the command above, but nothing pops up on its own.

Tested on tmux 3.6a on macOS on August 13, 2026. Every output above is what it actually printed. If you are on an older build, check tmux -V and confirm window_silence_flag exists before relying on it. The 60 second threshold is arbitrary, pick yours from how long your agents normally go quiet while thinking.

Your turn

What is your threshold, and how do you catch an agent that stopped? I am curious whether anyone has found a per pane workaround that does not involve polling the pty, because I could not.

The longer version, including where Claude Squad fits and when tmux stops being enough, is on the site: https://canvascode.app/en/news/run-multiple-ai-coding-agents-in-tmux

Top comments (0)