VS Code extension runs statusLine (never rendered in IDE) -> focus/panel-reveal war across multiple chat sessions in one window (Windows)

Open 💬 4 comments Opened Jun 24, 2026 by german-alonso-almex

VS Code extension runs statusLine (never rendered in the IDE) → focus / panel-reveal war across multiple chat sessions in one window (Windows)

Environment

  • Claude Code VS Code extension v2.1.187 (this is the IDE extension, not the terminal CLI)
  • VS Code on Windows 11
  • A multi-root workspace with 3 Claude Code chat sessions open as tabs in ONE window
  • A statusLine command configured in ~/.claude/settings.json (a pwsh script)

Summary

When a statusLine command is configured, the VS Code extension executes it repeatedly (spawning the shell
on each update). With multiple Claude Code chat panels in a single window, this drives a rapid focus / reveal()
war: the active editor keeps switching among the chat tabs — dozens of sub-second switches over ~30–40s on
window reload / session resume — so you cannot type until you click a non-VS-Code window to break the cycle.

Notably, the VS Code extension does not display a status line at all (that's a CLI/TUI feature) — yet it
still runs the command. So the work is pure cost with no visible output, and it causes this regression.

Repro

  1. Configure a statusLine in ~/.claude/settings.json, e.g. a trivial benign pwsh script that just prints a

string. (Ours is a pure text formatter — reads the status JSON on stdin, writes cwd | [model] | ctx% | $cost |
; no windows, no HTTP, no file writes, no focus calls.)

  1. Open 3 Claude Code chat sessions as tabs in one VS Code window.
  2. Reload the window / restart VS Code.
  3. Observe: the three chat panels rapidly steal focus from each other (and from the editor) for ~30–40s after

resume; typing is impossible until you focus another app.

Evidence — single-variable isolation

Captured with a 40 ms foreground-window poller (logs the foreground window handle + focused control + title on
every change). Full traces attached in this bundle.

| statusLine | other hooks | other extensions | result |
|---|---|---|---|
| ON | on | on | WAR — ~65 sub-second active-panel switches |
| OFF | on | on | clean (≤2 switches, then settles) |
| OFF | off | off | clean |
| ON | (Companion extension disabled) | on | still WAR |

Toggling only the statusline flips war ↔ clean. In every case the foreground window stays VS Code — this
is internal panel reveal() churn, not an external focus steal.

WAR excerpt (statusline ON — note the sub-second switching, all inside one window 0x00090752):

16:35:43.802  win=0x00090752  Code | Fix Dev - AI Local (Workspace)
16:35:43.950  win=0x00090752  Code | Companion - AI Local (Workspace)
16:35:45.159  win=0x00090752  Code | Fix Dev - AI Local (Workspace)
16:35:45.625  win=0x00090752  Code | Benchmarking - AI Local (Workspace)
16:35:48.856  win=0x00090752  Code | Fix Dev - AI Local (Workspace)
16:35:49.009  win=0x00090752  Code | Companion - AI Local (Workspace)
16:35:59.165  win=0x00090752  Code | Benchmarking - AI Local (Workspace)
16:35:59.442  win=0x00090752  Code | Companion - AI Local (Workspace)
16:35:59.944  win=0x00090752  Code | Benchmarking - AI Local (Workspace)
16:36:00.704  win=0x00090752  Code | Companion - AI Local (Workspace)

CLEAN excerpt (statusline OFF, same setup — switches are now 12s–80s apart = normal "a chat produced output"
reveals, no war):

23:01:53.188  win=0x0074108A  Code | Companion - AI Local (Workspace)
23:02:05.611  win=0x0074108A  Code | Benchmarking - AI Local (Workspace)
23:02:28.191  win=0x0074108A  Code | Companion - AI Local (Workspace)
23:02:36.584  win=0x0074108A  Code | Benchmarking - AI Local (Workspace)
23:03:57.645  win=0x0074108A  Code | Companion - AI Local (Workspace)

Workaround

Remove the statusLine config from ~/.claude/settings.json. Eliminates the war immediately.

Expected

The VS Code extension should not execute statusLine in IDE mode (it renders no status line), or should
execute it without changing editor/panel focus — so a configured statusline doesn't make multiple chat panels
fight for focus.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗