[BUG]
Resolved 💬 4 comments Opened Jan 22, 2026 by For-Sunny Closed Feb 28, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
- Version: 2.1.15
- Platform: Windows 11
- Issue: CLI hangs at "0 tokens" after background Task agents complete successfully
- Repro: Spawn 6-8 agents with run_in_background: true, agents complete, CLI freezes
- Related issues: #19195 (queue desync), #16590 (statsig), #19060 (no messages returned)
- Workarounds tried: Blocked statsig.anthropic.com and sentry.io, set DISABLE_TELEMETRY=1 - still hangs
This is clearly a CLI bug in how it handles agent completion notifications. The agents work fine, results come back,
but the main thread gets stuck waiting for something that already happened.
What Should Happen?
CLI should return to prompt after agents complete and allow continued interaction.
Actual Behavior
CLI hangs indefinitely showing "0 tokens" with no recovery. Agents complete successfully but the main thread never
resumes.
Error Messages/Logs
CLI hangs indefinitely showing "0 tokens" with no recovery. Agents complete successfully but the main thread never
resumes.
Steps to Reproduce
- Issue is intermittent but frequent with 6+ concurrent background agents
- Single agents work fine
- Agents themselves complete successfully - only the CLI notification/resumption fails
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.15
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
<img width="1103" height="278" alt="Image" src="https://github.com/user-attachments/assets/e854cc08-7718-4b34-9d5c-5acf64fd4f6b" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗