Skip to content

Refuse a second pane at once and record the tmux 3.6a cause - #248

Merged
memtomem merged 1 commit into
mainfrom
claude/zealous-planck-0v5xp3
Nov 1, 2026
Merged

memtomem merged 1 commit into
mainfrom
claude/zealous-planck-0v5xp3

Conversation

@pandas-studio

Copy link
Copy Markdown
Collaborator

Follow-up to #246. It ports what #247 found, which can no longer merge because #246 landed the same fix first. Supersedes #247.

What changes

Cause recorded. Between two CI runs, GitHub's ubuntu-latest moved from ubuntu-24.04 (tmux 3.4) to ubuntu-26.04 (tmux 3.6a). tmux 3.6a moves a new pane's child into its own systemd scope before it chdirs to -c: a D-Bus StartTransientUnit call plus a job wait that tmux caps at one second. The server answers new-session without waiting for that, so for up to about a second pane_current_path reports the server's cwd. #246 showed it was a timing race; #247 found why. The explanation now lives in the code comment on _PANE_CWD_SETTLE_SECONDS, the CHANGELOG entry, and a new section in docs/architecture/session.md.

attach refuses a session with more than one pane without waiting. A freshly spawned session never has two panes, so waiting wouldn't help. The other paths are unchanged:

  • a cwd that never reaches the worktree is refused after 3 s;
  • an empty path is polled like any other mismatch;
  • a failing list-panes raises at once.

CI. Both tmux matrix jobs print tmux -V, as posix-process already does.

Tests

  • New test_attach_refuses_more_than_one_pane_without_waiting in tests/test_isolated_session.py.
  • tests/test_isolated_session.py, tests/test_docs_freshness.py and SYNCMILL_TEST_TMUX=1 tests/test_isolated_session_tmux.py pass, and ruff check . is clean.

Generated by Claude Code

…ause

Ports what #247 found on top of #246's fix: `ubuntu-latest` moved to
ubuntu-26.04, whose tmux 3.6a moves a new pane into its systemd scope (a
D-Bus call tmux caps at one second) before it chdirs to `-c`, so
`pane_current_path` can report the server's cwd for about a second. The
code comment, the CHANGELOG entry and a new section in
docs/architecture/session.md now say so. `attach` refuses a session with
more than one pane without waiting (a fresh session never has two), and
both `tmux` CI jobs print `tmux -V` like `posix-process`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JfoLJ3AYkLnrNtL9KZipw9
@memtomem
memtomem force-pushed the claude/zealous-planck-0v5xp3 branch from 8e05cb9 to 7717198 Compare November 1, 2026 11:26
@memtomem
memtomem merged commit 043622b into main Nov 1, 2026
11 checks passed
@memtomem
memtomem deleted the claude/zealous-planck-0v5xp3 branch November 1, 2026 11:45
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