Skip to content

Point the tmux file-limit banner at a restart for legacy servers - #5

Merged
millwright-software merged 2 commits into
millwright-software:mainfrom
er0826-dex:fix/tmux-low-limit-restart-hint
Nov 11, 2026
Merged

millwright-software merged 2 commits into
millwright-software:mainfrom
er0826-dex:fix/tmux-low-limit-restart-hint

Conversation

@er0826-dex

Copy link
Copy Markdown
Contributor

Problem

On a tmux server stuck at the old macOS 256 open-file default, the banner reads:

tmux server near its open-file limit (193 of 256): 19 session(s) without live status. Close an extra agent-desk window (Troubleshooting: tmux file limit)

For such a server that advice is misleading:

  • The server stays capped at 256 no matter how many windows close — closing one only frees descriptors for a moment.
  • It assumes you have a second window to close. A single window with ~19 sessions fills a 256 server on its own, and there's nothing to close.

v1.0.28 already added the permanent fix (agent-desk raises its own limit to 16384 so a server it starts inherits that), but a server started earlier — or by a plain tmux from a shell — keeps 256 until it exits. The in-app banner never surfaced that; only troubleshooting.md point 3 did.

Change

Add ServerFiles.Relief(), the shortest instruction that actually gives the server room:

  • Low() (legacy, <1024) server → restart the tmux server to lift the limit — a fresh server inherits agent-desk's raised limit.
  • Roomier server merely full → Close an extra agent-desk window (unchanged).

All three banner branches in tmuxServerWarning() now use it (pm.Room() is hoisted so the unreachable branch can consult the limit too; pm == nil keeps the prior default phrasing).

Test

TestRelief covers both classes. go build ./cmd/agent-desk/, go vet, and the tmux suite pass.

Reproduced on a live 256-capped server (pid, ulimit -n 256, 197 files, 19 sessions).

er0826-dex and others added 2 commits November 11, 2026 10:10
The open-file-limit banner always said "Close an extra agent-desk window",
but a server on the old 256 default stays capped no matter how many windows
close, and a user hitting it may have only one window open. Closing a window
frees descriptors for a moment; it never lifts the ceiling.

Add ServerFiles.Relief(): a Low() (legacy, <1024) server is told to restart
the tmux server so a fresh one inherits agent-desk's raised 16384 limit (the
real fix since v1.0.28), while a roomier server that is merely full still
points to closing a window. All three banner branches use it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… is full

- Relief() for a low-limit server now says the restart ends every session
  (R resumes Claude ones), so the banner never points at the destructive
  fix without its cost.
- A full server cannot be probed, and the failed probe blanked the cached
  reading, so the "server is full" banner fell back to "Close an extra
  window" even on a 256 server. PipeManager keeps the last good reading
  (LastRoom) and that branch uses it.
- The low-limit notice keeps its reason ("another agent-desk window won't
  fit") ahead of the instruction.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@millwright-software
millwright-software merged commit 7680092 into millwright-software:main Nov 11, 2026
millwright-software added a commit that referenced this pull request Nov 11, 2026
#5)

On a tmux server stuck at the old 256 default the banner said "Close an
extra agent-desk window", which only buys a moment and assumes a second
window exists. It now says only a tmux server restart lifts the limit, and
that the restart ends every session (R resumes Claude ones). The "server is
full" banner keeps the last good probe reading, since a full server cannot
be probed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
millwright-software added a commit that referenced this pull request Nov 12, 2026
#5)

On a tmux server stuck at the old 256 default the banner said "Close an
extra agent-desk window", which only buys a moment and assumes a second
window exists. It now says only a tmux server restart lifts the limit, and
that the restart ends every session (R resumes Claude ones). The "server is
full" banner keeps the last good probe reading, since a full server cannot
be probed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants