[BUG] VS Code: running background tasks are not counted in the prompt-bar agents badge ("0 agents")
Summary
While a background shell command is running, the agents badge in the prompt bar shows "0 agents". The task is only discoverable by opening the Agent map, where it is listed as "1 background task". From the prompt bar it looks as though the session is idle when it is actually waiting on something.
Environment
- VS Code extension, macOS (arm64)
- Observed on 2026-11-04 (exact version not recorded). The installed extension is now 2.1.325; not re-checked on it.
Steps to reproduce
- In a panel session, ask Claude to run a long shell command in the background (the Bash tool with
run_in_background). - While it runs, look at the agents badge at the bottom of the prompt bar.
- Open the Agent map.
Expected
The badge reflects running background work, for example "0 agents · 1 task", or a separate indicator shows it.
Actual
The badge shows "0 agents". The Agent map lists the command under "1 background task · shell · 4m 25s".
Notes
The changelog says the "N agents" pill was added in 2.1.269, that it counts running agents (2.1.275), and that background shells and other running tasks were added to the Agent map (2.1.277). The pill count does not seem to have followed the map.
Why it matters
A user cannot tell without opening the map that the session is still waiting on something, so they may close the panel, start another turn, or reload the window and lose the task.
This is fixed as of Claude Code 2.1.336, so we're closing this issue. If you disagree, let us know here and we can re-open it. Thanks for reporting!