anthropics / anthropics/claude-code
Status bar "N agents" indicator doesn't clear/refresh after background tasks finish (needs window reload)
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the stale agent-count behavior in VSCode Remote with the extension update scenario described, comparing versions 2.1.270 and 2.1.272. Trace the status bar indicator and background-task lifecycle, then verify that the count refreshes when tasks finish without requiring a window reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100