-
Notifications
You must be signed in to change notification settings - Fork 0
Ghostty: no per-tab TTY/PID — missing cross-reference and TTY switch fallback #63
Description
Summary
Ghostty and cmux lacks per-tab TTY/PID in their APIs, which prevents two capabilities that iTerm2 has:
-
Detection cross-reference — for bare
claudeorclaude -rsessions with in-session/rename, iTerm2 can match PID → TTY → tab name → custom title → session ID. Ghostty/cmux cannot do this, so the purple dot may be on the wrong session. -
Switch TTY fallback — for
-r <uuid>sessions without/rename, iTerm2 can use TTY matching to switch to the correct tab even without a custom title. Ghostty/cmux fall back to cwd matching which may switch to the wrong tab.
What's needed
Either per-tab TTY or PID exposed via the terminal's API (AppleScript or CLI). Either one enables cross-referencing with claude process TTYs (ps -o tty=).
Upstream tracking
| Terminal | Item | Status | Impact |
|---|---|---|---|
| Ghostty | Issue #11592 — Add pid/tty to AppleScript terminal class | Open | Would enable both cross-reference and TTY switch fallback |
| Ghostty | PR #11354 — Expose PID/TTY on TerminalEntity | Open | Implementation in progress |
| cmux | PR #2040(released) | — | Could expose per-surface TTY via CLI (list-pane-surfaces or similar) |
Current workaround
Users should use claude -n "name" or /rename + exit + resume for same-cwd sessions on Ghostty/cmux. See README and design doc for the full accuracy matrix.
Related
- Detection layer: purple dot mapped to wrong session for same-cwd sessions #60 — Detection layer purple dot issue (fixed for most cases, iTerm2 cross-reference in PR feat: iTerm2 cross-reference for detection layer (purple dot) #62)
- PR fix: three-layer iTerm2 switch + custom title encoding + grep precision #56 — iTerm2 three-layer switch matching
- PR fix: detection regex matches -r for correct purple dot #61 — Detection regex fix + title disambiguation
🤖 On behalf of @grimmerk — generated with Claude Code