ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

macOS 26 (Tahoe): PTY dimensions not updated when creating/closing splits

Open aliovou opened this issue 9 months ago • 1 comments

Summary

On macOS 26.3 (Tahoe), Ghostty does not update PTY dimensions (TIOCSWINSZ) when split panes are created, closed, or resized. The shell/application in the existing pane continues to see the old column/row values. This works correctly on macOS 14.5.

Environment

  • Ghostty version: 1.2.3 (stable) — also tested on 1.3.0-main+2ac3c1f1d (tip), same behavior
  • macOS: 26.3 (Build 25D125), Darwin 25.3.0
  • Hardware: MacBook Pro M1 Pro, 16GB RAM
  • Display: Built-in Retina, no external monitor

Steps to Reproduce

  1. Open Ghostty with a single pane
  2. Run stty -a | grep columns → reports correct value (e.g., 179 columns)
  3. Create a vertical split with Cmd+D
  4. In the original (left) pane, run stty -a | grep columns again
  5. Expected: columns should roughly halve (e.g., ~89)
  6. Actual: columns still reports the old full-width value (179)

The same issue occurs in reverse — closing a split does not update the remaining pane's PTY to full width.

Comparison with macOS 14.5

Tested the exact same Ghostty version (1.2.3) on a macOS 14.5 machine with no custom config:

  • Before split: 179 columns ✓
  • After split: 89 columns ✓ (correctly updated)

This confirms the regression is macOS 26-specific, not a Ghostty version issue.

Impact

Any TUI application (Claude Code, Vim, htop, etc.) running in a split pane renders at the wrong width after split changes. Applications that rely on SIGWINCH or TIOCGWINSZ to detect terminal size never receive the updated dimensions.

Possible Root Cause

macOS Tahoe changed how NSSplitView propagates layout/bounds changes to child views — child views no longer get immediate bounds updates during resize. The BeeWare/Toga project hit the same issue and fixed it by replacing deferred refresh with layoutIfNeeded(): https://github.com/beeware/toga/issues/3787

If Ghostty's split implementation relies on SwiftUI/AppKit view layout callbacks to trigger Surface.resize() → Termio .resize → TIOCSWINSZ, a delayed or missed callback in Tahoe could explain why the PTY never gets updated dimensions.

Workaround

Manually setting the TTY dimensions and sending SIGWINCH:

stty columns <correct_cols> rows <correct_rows> < /dev/<tty>
kill -SIGWINCH <pid>

Related

  • #7557 — Meta: macOS Tahoe (v26) tracking issue
  • #7546 — macOS regression: closing leftmost split (UI rendering, fixed in 1.2.0)
  • Discussion #3699 — Wrong tput cols on new window (startup race, different issue)

aliovou avatar Feb 20 '26 07:02 aliovou

Hi @aliovou, thanks for your interest!

This project requires that issue reporters are vouched, and you are not in the list of vouched users.

This issue will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details.

ghostty-vouch avatar Feb 20 '26 07:02 ghostty-vouch