[Bug]: A thread that only waits shows as Working and stays on the Working shelf #47837
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/web
Steps to reproduce#
- In a Claude thread, ask the agent to start a long background command, such as
sleep 3600, and to wait for it with thet3_background_waittool. - Let the turn end while the command still runs.
- Look at the thread's status pill in the sidebar, and at the shelf that holds the thread.
The same happens when the agent waits on another thread with t3_thread_wait.
Expected behavior#
The turn has ended, and the thread only waits. The row reads Waiting, and the thread stays in the inbox. The Working shelf and the pulsing Working pill belong to a turn that runs.
Actual behavior#
- The row shows the pulsing Working pill while the runtime status is
waiting.resolveSidebarThreadStatusandresolveThreadStatusPilltreatwaitinglikerunning(apps/web/src/components/Sidebar.logic.ts:1007andapps/web/src/components/Sidebar.logic.ts:1308). isThreadWorkingputs the thread on the Working shelf (packages/client-runtime/src/state/threadInbox.ts:22). It returns true in three waiting cases:- runtime
waiting, becausethreadRunStatusIsActivecountswaitingas active - runtime
idlewhile awaited background tasks hold the thread - runtime
runningwithblockedOnThreadWait
- runtime
- The sidebar labels the last two cases Waiting. The row says Waiting, but the shelf says Working.
- When the awaited work runs for hours or never ends, the thread stays on the Working shelf the whole time. I do not notice that the agent stopped and the thread needs me.
Impact#
Major degradation or frequent failure
Version or commit#
main @ c5651d74d6
I saw this in my own build, which follows main. The code above is the same on main @ c5651d74d6.
Environment#
macOS, desktop app, Claude provider
Possible fix#
In my build, isThreadWorking returns false in the three waiting cases, and the pill shows Waiting for runtime waiting. Running, starting, queued, and preparing turns stay on the Working shelf.
I prepared this report with an AI coding agent and reviewed it myself.
tanstack-source added labelsbug
Sign in to join this conversation.