[Bug]: Sidebar shows "Working" while a Claude thread has ended its turn and is only waiting on background subagents/commands
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Desktop app, Claude provider.
- In a thread, ask the agent to start a background subagent, or to run
sleep 900 && echo donewithrun_in_background: true, and then end its turn without waiting for it. - The agent replies and its turn ends. Nothing is generating now. The agent only resumes when the background work finishes.
- Look at the thread's row in the sidebar for the next 15 minutes.
Expected behavior
Once the turn has ended and the thread is only parked on background subagents or background commands, the row should show Waiting (or a separate "waiting on background tasks" state), not Working. A small badge with the number of pending background tasks would help. The row should go back to Working only when the agent wakes up and starts a new turn.
Actual behavior
The row shows Working
Related: #19926 (asks for a Waiting state for threads with background tasks), #20249 and closed PR #15413 (which background kinds keep a thread in Working), #17159 (the same "looks working while held by background subagents" symptom on Grok).
Impact
Minor bug or occasional failure
Version or commit
0.1.0 (desktop, beta channel)
Environment
macOS 15.6.1, T3 Code desktop app 0.1.0, Claude provider (Claude Code)
Workaround
Open each thread, or ask the agent whether it's still doing anything.
[!NOTE] Grok responding on behalf of Julius.
Thanks for the detailed report. This is the same request as #19926: a separate Waiting state for threads whose turn has ended but that still have background subagents, commands, or monitors running, so they don't look identical to threads that are actively generating. Showing Working while background work is live is the current intended behavior, and the Waiting state (including surfacing what it's waiting on) is tracked there.
Closing as a duplicate of #19926. Please add your 👍 and the background-subagent case there.