Summary
Ghostty and cmux lacks per-tab TTY/PID in their APIs, which prevents two capabilities that iTerm2 has:
-
Detection cross-reference — for bare claude or claude -r sessions 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 & PR #11922— 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
🤖 On behalf of @grimmerk — generated with Claude Code
Summary
Ghostty
and cmuxlacks 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
list-pane-surfacesor 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
🤖 On behalf of @grimmerk — generated with Claude Code