You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Terminal width probe fails under Claude Code ≥ 2.1.139 (no controlling TTY for spawned statusline) #376
On Linux under Claude Code ≥ 2.1.139, ccstatusline's TTY-width probe fails entirely and falls back to tput cols → 80. With the default flexMode: "full-minus-40", the statusline truncates at 40 columns regardless of actual terminal width.
Fixed a bug where a hook writing to the terminal could corrupt an on-screen interactive prompt; hooks now run without terminal access.
The statusLine spawn is hardened the same way. The ancestor walk in probeTerminalWidth correctly finds the controlling PTY, but getWidthForTTY's stty size < /dev/${tty} form fails with ENOTTY when the calling process has no controlling terminal.
Reproducible without ccstatusline via setsid -w bash -c 'stty size < /dev/pts/0' — confirms it's generic, not terminal-emulator-specific.
Fix
Use stty -F <path> size (GNU coreutils) or stty -f <path> size (BSD); they open the device internally and succeed regardless of controlling-tty status. PR coming.
Related
Open requests to expose terminal.width in the statusLine JSON, which would future-proof this independently:
Activity