Summary
When multiple clients are attached to a session at different sizes, the window is sized to the smallest client (expected). But after a client disconnects, the window never resizes back to the remaining client(s), and there is no way to fix it from config:
window-size (latest/largest/manual) and aggressive-resize have no effect. They are parsed, validated and stored, but nothing in the resize logic reads them — they are EFFECT_NONE stub options. So you cannot configure the window to follow the largest/latest client.
- No hook fires on an abnormal disconnect. On a clean detach (
detach-client / prefix+d) the client-detached hook fires, so a resize-window -A hook can recover. But on an abnormal disconnect (network drop, app/terminal killed), the dead client is pruned lazily with no event emitted and no resize, so a hook-based auto-resize can't cover the common case.
- The hooks you would reach for are dead.
client-resized, client-active, client-focus-in, client-focus-out are defined but never emitted.
Net effect on Windows: attach a small client (e.g. a phone over SSH), the desktop window shrinks to the phone's size; the phone drops abnormally; the desktop window is stuck small and even resizing the desktop terminal doesn't grow it. The only recovery is a manual resize-window -A.
Environment
- rmux 0.7.1, Windows 11 (10.0.26200), Windows Terminal + ConPTY, PowerShell 7.
Evidence (source, v0.7.1)
(1) window-size / aggressive-resize are no-op stubs:
OptionName::WindowSize appears only at its own definition/declaration (option table crates/rmux-core/src/options/table.rs around the window-size entry, and crates/rmux-proto/src/types/options.rs) — no resize/geometry code reads it. (handler_window.rs's local window_size sort variable in resize-window -A is unrelated.)
- Both
window-size and aggressive-resize are marked EFFECT_NONE in the option table → changing them triggers no recompute.
aggressive-resize likewise appears only in definition/type/parse, with zero references in resize logic.
- Live:
set -g window-size latest → exit 0; show -g window-size → window-size latest; set -g window-size bogus → unknown value: bogus. Fully parsed/validated, yet zero effect.
(2) No event on abnormal disconnect:
client-detached is emitted only on the explicit detach-client path (crates/rmux-server/src/handler_client/detach.rs).
- Abnormal disconnects are pruned lazily in
crates/rmux-server/src/handler_attach/refresh.rs (stale PIDs removed when an enqueue/write to the client fails) — no LifecycleEvent emitted, no window recompute.
client-resized / client-active / client-focus-in / client-focus-out: only the enum definitions match a repo-wide search — zero emit sites (dead hooks). (Event→hook mapping: crates/rmux-core/src/lifecycle.rs.)
Repro
- Attach two clients to one session at different sizes (e.g. a 175-col desktop + a 69-col phone over SSH). The window shrinks to 69 (expected).
set -g window-size largest (or latest) — no effect; window stays 69.
- Kill the small client abnormally (drop its network / close the app). No
client-detached fires; window stays 69.
- Resize the desktop terminal — the window is still stuck at 69.
resize-window -A manually → the window finally grows to 175.
Ask (any one of these would fix it)
- Make
window-size (at least largest / latest) actually drive window geometry; or
- Emit a lifecycle event and recompute the window size when a client is pruned on abnormal disconnect; or
- Implement the dead hooks (
client-resized etc.) so a config-level auto-resize is possible.
Any one removes the need for an external polling watcher, which is currently the only reliable workaround on Windows (poll list-clients; when a session is down to one client whose width ≠ the window width, run resize-window -A).
Note
Works in tmux: window-size latest / aggressive-resize drive geometry, so the window follows the active client and recovers after a disconnect. Happy to provide more detail or test patches.
Summary
When multiple clients are attached to a session at different sizes, the window is sized to the smallest client (expected). But after a client disconnects, the window never resizes back to the remaining client(s), and there is no way to fix it from config:
window-size(latest/largest/manual) andaggressive-resizehave no effect. They are parsed, validated and stored, but nothing in the resize logic reads them — they areEFFECT_NONEstub options. So you cannot configure the window to follow the largest/latest client.detach-client/ prefix+d) theclient-detachedhook fires, so aresize-window -Ahook can recover. But on an abnormal disconnect (network drop, app/terminal killed), the dead client is pruned lazily with no event emitted and no resize, so a hook-based auto-resize can't cover the common case.client-resized,client-active,client-focus-in,client-focus-outare defined but never emitted.Net effect on Windows: attach a small client (e.g. a phone over SSH), the desktop window shrinks to the phone's size; the phone drops abnormally; the desktop window is stuck small and even resizing the desktop terminal doesn't grow it. The only recovery is a manual
resize-window -A.Environment
Evidence (source, v0.7.1)
(1)
window-size/aggressive-resizeare no-op stubs:OptionName::WindowSizeappears only at its own definition/declaration (option tablecrates/rmux-core/src/options/table.rsaround thewindow-sizeentry, andcrates/rmux-proto/src/types/options.rs) — no resize/geometry code reads it. (handler_window.rs's localwindow_sizesort variable inresize-window -Ais unrelated.)window-sizeandaggressive-resizeare markedEFFECT_NONEin the option table → changing them triggers no recompute.aggressive-resizelikewise appears only in definition/type/parse, with zero references in resize logic.set -g window-size latest→ exit 0;show -g window-size→window-size latest;set -g window-size bogus→unknown value: bogus. Fully parsed/validated, yet zero effect.(2) No event on abnormal disconnect:
client-detachedis emitted only on the explicit detach-client path (crates/rmux-server/src/handler_client/detach.rs).crates/rmux-server/src/handler_attach/refresh.rs(stale PIDs removed when an enqueue/write to the client fails) — noLifecycleEventemitted, no window recompute.client-resized/client-active/client-focus-in/client-focus-out: only the enum definitions match a repo-wide search — zero emit sites (dead hooks). (Event→hook mapping:crates/rmux-core/src/lifecycle.rs.)Repro
set -g window-size largest(orlatest) — no effect; window stays 69.client-detachedfires; window stays 69.resize-window -Amanually → the window finally grows to 175.Ask (any one of these would fix it)
window-size(at leastlargest/latest) actually drive window geometry; orclient-resizedetc.) so a config-level auto-resize is possible.Any one removes the need for an external polling watcher, which is currently the only reliable workaround on Windows (poll
list-clients; when a session is down to one client whose width ≠ the window width, runresize-window -A).Note
Works in tmux:
window-size latest/aggressive-resizedrive geometry, so the window follows the active client and recovers after a disconnect. Happy to provide more detail or test patches.