Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Turn iTerm2 into a workbench for running many Claude Code / Codex sessions: live state icons and tab colors driven by CLI hooks, tabs auto-grouped and sorted by directory → AI tool → account, repo/branch badges, per-tool icons. One-command install.
Jump to setup instructionsFetched from the repository for this visit.
English · 中文
Turn iTerm2 into a workbench for running many Claude Code / Codex CLI sessions at once. One glance at the tab bar tells you which agent is working, which one is waiting for you, and which one is done.
● feature-auth ← waiting for you (tab breathes purple, Dock icon bounces)
⠹ fix-flaky-test ← running (spinner in the title)
⋯ deploy-staging ← finished talking, but a background shell is still running
✓ refactor-db ← done
notes ← idle
▲ migrate-schema ← error
run_in_background shell is still running, the tab shows ⋯ instead of a false ✓.Repo:, Branch:, and the logged-in account (Claude: alice, Codex: alice@example.com).✳ idle mark in the terminal title and clears the stuck spinner.git clone https://github.com/KolorYan/iterm2-agent-tabs.git && cd iterm2-agent-tabs
./install.sh # --theme islands|idea|vscode|none (default islands; none keeps your colors)
Then, once:
claude or codex. Codex asks you to trust the new hooks on first start.Self-test in any agent tab: ~/.agent-tabs/agent-tab-state.sh waiting (restore with … reset).
Uninstall: ./install.sh --uninstall (your settings.json / hooks.json are backed up before every change and only our own entries are removed).
Claude Code / Codex hook ──► agent-tab-state.sh ──► OSC 1337 SetUserVar (user.agentState, user.agentGroup)
│ written to the agent's own tty
▼
agent_tabs.py (iTerm2 AutoLaunch, Python API)
summarises each tab's panes → tab title, color, order, icon
agent-tab-state.sh maps hook events to a state, finds the tty by walking up the process tree (Codex detaches from its tty, so /dev/tty is not usable) and writes the iTerm2 escape sequences. It also detects background shells by looking for the shell-snapshots command line Claude Code uses.configure.py merges the hooks into ~/.claude/settings.json and ~/.codex/hooks.json (idempotent, recognises its own entries by the script name, backs up first), writes an iTerm2 dynamic profile, and sets Codex's terminal_title.agent_tabs.py subscribes to session variables and layout changes and re-checks everything every 60 s. Only one instance runs (pidfile lock); an old instance exits when a newer one takes over.| Setting | Where | Effect |
|---|---|---|
AGENT_TAB_ATTENTION=0 | env | don't bounce the Dock icon when waiting for you |
AGENT_TAB_COLOR=0 | env | title glyph only, never change tab colors |
AGENT_TAB_BGWATCH=0 | env | disable background-shell detection (Stop always means done) |
AGENT_TAB_TTY=/dev/ttysNNN | env | write to a specific terminal (debugging) |
BLINK_INTERVAL, BG_BLINK_INTERVAL, SPIN_INTERVAL | top of agent_tabs.py | breathing / spinner speed; 0 turns the animation off |
PALETTES, GROUP_PALETTE | top of agent_tabs.py | colors |
CUSTOM_ICON_TOOLS, ICON_DIR | agent_tabs.py | which tools use a custom icon, and where the PNGs live (~/.agent-tabs/icons/<tool>.png) |
~/.agent-tabs/icons/codex.png.python3 tests/test_agent_tabs.py # drives agent_tabs.py against a fake iterm2 module
python3 tests/test_configure.py # runs configure.py in a throw-away $HOME
python3 tests/test_install.py # install / re-install / uninstall end to end (`defaults` stubbed)
Apache-2.0 — see LICENSE.
GitHub checked 208h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.