Skip to content

✨ feat: 🖥️ tabstatus — set this tab's iTerm2 Session Status row in one command - #91

Merged
hadees merged 1 commit into
mainfrom
feat/tabstatus
Oct 2, 2026
Merged

hadees merged 1 commit into
mainfrom
feat/tabstatus

Conversation

@hadees

@hadees hadees commented Oct 1, 2026

Copy link
Copy Markdown
Owner

What

tabstatus <status> [detail] [it2 flags…] sets this tab's row in iTerm2's Session Status panel; tabstatus alone clears it.

tabstatus "reviewing PR" "waiting on CI" --dot-color '#66cccc'

Why it2 set-status, not OSC 21337

The 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 ships it2 set-status, which goes through the API and needs no tty. Its only friction is the mandatory --session, so tabstatus fills that in from $ITERM_SESSION_ID.

Caveat

Inside a Claude Code session, iTerm2's own cc-status hook 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

  • Live against this tab: free-text status, detail, dot colour, clear, error outside iTerm2
  • tests/tabstatus.bats (stub it2): 3/3
  • tests/shell.bats, tests/git-doctor.bats, tests/iterm2-doctor.bats still pass

🤖 Generated with Claude Code

…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>
@hadees hadees self-assigned this Oct 1, 2026
@hadees
hadees merged commit c2aeba7 into main Oct 2, 2026
5 checks passed
@hadees
hadees deleted the feat/tabstatus branch October 2, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant