Skip to content

fix(pty): restore initial creator leadership - #25

Merged
serabi merged 7 commits into
feat/attach-existingfrom
fix/827-creator-leadership
Oct 21, 2026
Merged

serabi merged 7 commits into
feat/attach-existingfrom
fix/827-creator-leadership

Conversation

@serabi

@serabi serabi commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

Make the client that creates a new session its first leader, restoring resizing and terminal replies before the first keystroke. Attaching to an existing session still preserves its size without claiming leadership.

Follow-up to #24 for Interactive-Buffoonery/awesomux#827.

What's Included

  • Grant initial leadership on the first valid terminal handshake for a fresh interactive session, applying its size in order.
  • Keep Watch, automation and existing task-session attachments from claiming that initial authority.
  • Cover creator resizing, replies, Escape, takeover and non-claiming reattachment.

Validation

  • Both socket harnesses, 24 creator cases, 21 ordering regressions, 122 ReleaseSafe Zig tests and 52 BATS tests passed.
  • The initial fix passed real-Mac pre-input resizing, automatic CPR/colour replies and a physical Escape keypress. A later candidate stopped during window-focus setup before reaching these scenarios; cleanup passed. The final startup-sizing revision has not had a native run.
  • Independent reviews found and helped fix automation eligibility and startup sizing bugs. The revised startup sizing fix passed fresh Codex and Opus reviews with no required changes. Native creator and close/reopen verification remain blocked because macOS Notification Center holds foreground focus. The awesoMux pin update remains gated on a native pass.

Follow-ups

How should Escape and terminal-query replies behave after a reattach with no leader? This change leaves that policy unchanged for Sarah to decide.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@serabi
serabi marked this pull request as ready for review October 21, 2026 06:41
@serabi
serabi merged commit 7003190 into feat/attach-existing Oct 21, 2026
1 check passed
serabi added a commit that referenced this pull request Nov 7, 2026
…adership

fix(pty): restore initial creator leadership
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.

1 participant