Ink focus-out re-render triggers iTerm2 activity indicator on tab switch

Status Open
Maintainer reply None cached
Activity 7 comments · opened Mar 2, 2026

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

  1. Open Claude Code in an iTerm2 tab
  2. Switch to a different tab
  3. 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)

View original on GitHub ↗

6 Comments

github-actions[bot] · 6 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/22086
  2. https://github.com/anthropics/claude-code/issues/19030

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

joshkaplan · 5 months ago

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)

kaansoral · 4 months ago

Still an issue on 2.1.117 - no way to know which tab produces a result while using iTerm2 ...

tcivie · 4 months ago

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.

  1. iTerm2 → Settings → Profiles → Terminal:
  • Uncheck Show activity indicator
  • Check Show bell indicator
  • Check Silence bell (kills the sound, keeps the visual)
  1. Add a Stop hook in ~/.claude/settings.json:
{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          { "type": "command", "command": "printf '\\a' > /dev/tty 2>/dev/null || true" }
        ]
      }
    ]
  }
}

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.

nsangwan · 3 months ago
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)

Neither solves the issue.

intu-nwells2 · 2 months ago

To clarify, uncheck "Show new-output indicator" to get rid of the blue dot. The "Show activity indicator" is for the spinner.

Showing cached comments. Read the full discussion on GitHub ↗