Repository navigation
✨ feat: 🖥️ tabstatus — set this tab's iTerm2 Session Status row in one command - #91
Merged
Merged
Conversation
…e command iTerm2 3.7's Session Status panel can be set with the OSC 21337 escape, but that escape has to reach the tab's tty, and neither Claude Code's Bash tool nor its hooks have one (ps -o tty= answers ??). iTerm2 also ships `it2 set-status`, which goes through the API and needs no tty. The only friction is its mandatory --session, so tabstatus reads the id from $ITERM_SESSION_ID and passes everything else through. --status takes free text, not just the idle/working/waiting the help lists (verified live). Inside a Claude Code session iTerm2's own cc-status hook rewrites the row on the next event, so a manual status lasts about a turn. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tabstatus <status> [detail] [it2 flags…]sets this tab's row in iTerm2's Session Status panel;tabstatusalone clears it.Why
it2 set-status, not OSC 21337The escape has to be written to the tab's tty, and neither Claude Code's Bash tool nor its hooks have one (
ps -o tty=answers??). iTerm2 shipsit2 set-status, which goes through the API and needs no tty. Its only friction is the mandatory--session, sotabstatusfills that in from$ITERM_SESSION_ID.Caveat
Inside a Claude Code session, iTerm2's own
cc-statushook rewrites the row on the next Claude Code event, so a status set there lasts about a turn. In a plain shell tab it stays until changed.Verified
tests/tabstatus.bats(stubit2): 3/3tests/shell.bats,tests/git-doctor.bats,tests/iterm2-doctor.batsstill pass🤖 Generated with Claude Code