| 1 | # tmux configuration for anvil agent sessions. |
| 2 | # |
| 3 | # The browser terminal is the only client, so the usual interactive niceties |
| 4 | # (status bar, prefix gymnastics) are noise. What matters is that the pane |
| 5 | # behaves like a real terminal for a TUI and that scrollback is deep enough to |
| 6 | # replay on reconnect. |
| 7 | |
| 8 | # No status bar: the web UI already shows session state around the terminal, |
| 9 | # and a status line would eat a row and confuse `capture-pane` replay. |
| 10 | set -g status off |
| 11 | |
| 12 | # Mouse reporting through to the application, so a TUI's click targets and |
| 13 | # scroll work in the browser. |
| 14 | set -g mouse on |
| 15 | |
| 16 | # Deep scrollback — `capture-pane -S -` replays this on reconnect, and an agent |
| 17 | # session produces a lot of output before anyone looks at it. |
| 18 | set -g history-limit 50000 |
| 19 | |
| 20 | # 256-colour + true-colour advertisement. wterm's core resolves 24-bit SGR, so |
| 21 | # there is no reason to let tmux downsample. |
| 22 | set -g default-terminal "tmux-256color" |
| 23 | set -ga terminal-overrides ",*256col*:Tc" |
| 24 | |
| 25 | # Keep the pane after its command exits, so the browser can still read the last |
| 26 | # screen; the entrypoint decides when the container is actually done. |
| 27 | set -g remain-on-exit on |
| 28 | |
| 29 | # Do not renumber or rename out from under the supervisor, which addresses the |
| 30 | # session by name. |
| 31 | set -g allow-rename off |
| 32 | |
| 33 | # With several browsers attached, size the window to the most recently active |
| 34 | # client rather than the smallest. The default ("smallest") means one phone |
| 35 | # viewer squeezes everyone else's terminal down to its width for as long as it |
| 36 | # stays connected. |
| 37 | set -g window-size latest |