By strml
iTerm2 tab highlighting for Claude Code permission requests — orange tab + dock bounce on permission, auto-reset on focus
A Claude Code plugin that highlights your iTerm2 tab when Claude needs permission. The tab turns orange and bounces the dock icon. The color resets instantly when you focus the tab.
Three components:
Notification hook — When Claude requests permission, sets the tab to orange and tags the session with an iTerm2 user variable.
Reset hook — Clears the tab color when Claude resumes work (PostToolUse) or you submit a prompt (UserPromptSubmit). Fallback for the focus-based reset.
Focus-based reset (optional) — An iTerm2 Python API script that monitors tab focus events. When you switch to a tab with an active alert, it resets the color immediately via the profile API.
/plugin marketplace add STRML/cc-iterm2-tab-alert
/plugin install iterm2-tab-alert
Then restart Claude Code. The hooks activate automatically.
For instant focus-based reset, run /iterm2-tab-alert:setup in Claude Code.
Paste this into Claude Code:
Install the iTerm2 tab alert plugin:
1. Run: /plugin marketplace add STRML/cc-iterm2-tab-alert
2. Run: /plugin install iterm2-tab-alert
3. Restart Claude Code
4. Run: /iterm2-tab-alert:setup
Copy hooks/iterm2-permission-alert.sh and hooks/iterm2-tab-reset.sh to ~/.claude/hooks/
Add the hooks from hooks/hooks.json to your ~/.claude/settings.json (replace ${CLAUDE_PLUGIN_ROOT} with $HOME/.claude/hooks in the command paths)
(Optional) Copy scripts/claude_tab_reset.py to ~/Library/Application Support/iTerm2/Scripts/AutoLaunch/
In iTerm2: Scripts > Manage > Install Python Runtime, then Scripts > claude_tab_reset
The Python script is optional. Without it, the tab color still resets — just not until Claude resumes work or you submit your next prompt.
Edit hooks/iterm2-permission-alert.sh. The format is iTerm2's proprietary OSC escape:
# RGB components (0-255) — default is orange (255, 120, 0)
printf '\033]6;1;bg;red;brightness;R\a\033]6;1;bg;green;brightness;G\a\033]6;1;bg;blue;brightness;B\a'
Remove the RequestAttention line in the alert script to disable dock icon bouncing.
Each Claude session writes its own sentinel file keyed by the TTY minor device number (stat -f '%Lr' /dev/tty), so multiple concurrent sessions don't interfere with each other.
| Escape | Purpose |
|---|---|
\033]6;1;bg;red;brightness;N\a | Set tab color red component |
\033]6;1;bg;green;brightness;N\a | Set tab color green component |
\033]6;1;bg;blue;brightness;N\a | Set tab color blue component |
\033]6;1;bg;*;default\a | Reset tab color to default |
\033]1337;RequestAttention=1\a | Bounce dock icon / flash tab |
\033]1337;SetUserVar=NAME=BASE64\a | Set session user variable |
set_use_tab_color(False) instead of async_injectiTerm2's async_inject doesn't process proprietary OSC sequences (like tab color). The focus-monitor uses the profile API (set_use_tab_color(False)) which directly controls the tab color state.
MIT
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub strml/cc-iterm2-tab-alert --plugin iterm2-tab-alertMulti-model AI plan review: run any acpx-supported agent (Codex, Gemini, Kimi, Qwen, etc.) in parallel, synthesize feedback, debate contradictions
Detects plugin marketplace updates at session start and flags security-relevant changes for review
Language-agnostic codemap generator for Claude Code. Scans your codebase and generates token-lean architecture maps that load into context at session start.
Automatically record browser demo videos of pull requests using agent-browser
Persistent cross-session memory for Claude Code. Hooks extract learnings automatically; Sonnet + Opus maintain MEMORY.md files per project and globally.
Show iTerm2 tab status (running/idle/attention) for Claude Code sessions
Native Windows toast notifications for Claude Code with window activation
Warp terminal integration for Claude Code - native notifications, and more to come
Updates iTerm2 window title with Claude Code status indicators showing current activity (working, editing files, running commands, etc.)
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Easily create hooks to prevent unwanted behaviors by analyzing conversation patterns