Ink focus-out re-render triggers iTerm2 activity indicator on tab switch
Bug
Switching away from a Claude Code tab in iTerm2 causes a spinner followed by a blue activity dot on the tab. This happens every time you switch tabs, making it look like Claude Code is doing work when it's idle.
Root cause
Claude Code's TUI framework (Ink) responds to terminal focus-in/focus-out escape sequences by re-rendering, which writes ANSI output to stdout. iTerm2 interprets any stdout activity on a background tab as "activity" and shows the blue dot indicator.
Reproduction
- Open Claude Code in an iTerm2 tab
- Switch to a different tab
- Observe the spinner, then blue dot on the Claude Code tab
Happens every time, regardless of whether Claude is actively working.
Diagnostic results
We isolated the cause by progressively disabling components:
| Test | Configuration | Blue dot? |
|------|--------------|-----------|
| Baseline | Everything enabled | Yes |
| No statusline | statusLine removed from settings | Yes |
| No statusline + no hooks | Both removed from settings | Yes |
With all user-configurable features disabled, the blue dot still appears, confirming it's internal to Claude Code's rendering layer.
Workaround
iTerm2 > Settings > Profiles > Terminal > uncheck "Show activity indicator"
This suppresses the symptom but is a blunt fix — it disables the indicator for all programs in that profile, not just Claude Code.
Suggested fix
Suppress Ink re-renders when the terminal reports focus-out (CSI I / CSI O sequences), or avoid writing to stdout in response to focus change events when there's no actual state change to render.
Environment
- macOS (Darwin 25.3.0)
- iTerm2
- Claude Code (latest as of 2026-03-02)
Showing cached comments. Read the full discussion on GitHub ↗
6 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
not stale, this is still an issue on 2.1.81
the workaround setting is actually at
Appearance → Tabs → Show activity indicator (spinner) / Show new-output indicator (blue dot)Still an issue on 2.1.117 - no way to know which tab produces a result while using iTerm2 ...
Workaround until the Ink re-render is suppressed: swap the (broken) blue activity dot for the red bell dot, which iTerm2 tracks separately and isn't triggered by stdout activity.
Stophook in~/.claude/settings.json:Result: tab stays clean while Claude works (no false-positive blue dot on focus changes), red bell dot lights only when Claude actually finishes. Better signal than the original behavior, even once the bug is fixed.
Neither solves the issue.
To clarify, uncheck "Show new-output indicator" to get rid of the blue dot. The "Show activity indicator" is for the spinner.