Status bar "N agents" indicator doesn't clear/refresh after background tasks finish (needs window reload)

Status Open
Reported on v2.1.270
Maintainer reply None cached
Activity 0 comments · opened Sep 15, 2026

Description

The status bar's agent-count indicator (e.g. "2 agents") kept showing a stale count after all background tasks/agents had actually finished:

  • All background bench/dev-server processes had been killed, and ListAgents (session tool) confirmed no active subagents or peer sessions were running.
  • The status bar still showed "2 agents" regardless.
  • Reloading the VSCode window immediately fixed the display back to the correct count.

Possible cause

The extension appears to have auto-updated mid-session: the running extension host process was confirmed on anthropic.claude-code-2.1.270 while the indicator was stuck, and after the window reload it came up on 2.1.272 (both versions were present on disk under ~/.vscode-server/extensions/). It's possible the pre-update extension host held onto stale UI/task state that a new install didn't reconcile without a full reload, rather than the count simply failing to decrement in general — but I only have the one repro, so can't rule out a plain decrement bug.

Environment

  • VSCode remote (linux-arm64 container)
  • Extension versions involved: 2.1.270 → 2.1.272

Steps to reproduce (best guess, unconfirmed)

  1. Have the extension auto-update while a session with background tasks is open.
  2. Let the background tasks finish/get killed.
  3. Observe the status bar's agent count not decrementing.
  4. Reload the window — count corrects itself.

View original on GitHub ↗