[FEATURE] Agent Teams tmux mode: make the leader pane width configurable and keep user resizes
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
In Agent Teams with teammateMode: "tmux", the leader pane is reduced to 30% of the window width as soon as the first teammate spawns, and it is reset to 30% every time another teammate spawns.
The leader pane is the one I type into and read results from, so it is the pane I use most. On a ~200-column terminal, 30% leaves about 60 columns, which is too narrow to read code, diffs, or long tool output comfortably.
Resizing the leader pane by hand does not last: the next teammate spawn sets it back to 30%. Setting tmux's main-pane-width has no effect either, because the width is applied with an explicit resize-pane.
From the bundled code in 2.1.285 (TmuxBackend), the behavior comes from:
- first teammate:
split-window -d -t <leader> -h -l 70%(the new pane takes 70%, the leader keeps 30%) - every later teammate (
rebalancePanesWithLeader):select-layout main-vertical, thenresize-pane -t <first pane> -x 30%
Proposed Solution
Either of these would solve it; both together would be best:
- A setting for the leader pane width, for example
"teammateLeaderPaneWidth": "50%"insettings.json(default30%to keep the current behavior). - Keep the leader's current width when rebalancing: apply the 30% default only when the first teammate is spawned, and let later rebalances resize only the teammate panes, so a manual resize survives new spawns.
Alternative Solutions
teammateMode: "in-process": avoids the problem but loses the per-teammate panes.- Starting the leader outside tmux, so teammates go to a separate tiled window: works, but the leader is then not inside tmux.
- Resizing the leader by hand after all teammates have spawned: works until the next spawn resets it.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
Replaying the tmux commands above in a 200x50 window:
| Step | Leader pane width |
|---|---|
| leader alone | 200 |
| after teammate 1 | 59 |
| after teammate 2 | 60 |
| user runs resize-pane -x 120 on the leader | 120 |
| after teammate 3 | 60 (manual resize lost) |
With a width setting of 50%, or with the manual width preserved, I could keep reading the leader's output while teammates run.
Additional Context
- Claude Code 2.1.285, tmux 3.7c, macOS
- Related: #23615 (spawn teammates in a new window), #25396 (teammates as separate tmux windows), #71799 (teammate grid layout), #23950 (split direction). None of these covers the leader pane width.