[Bug]: Sidebar hides a finished thread's unseen completion while a background shell it left running is still alive #14872
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
Not sure
Steps to reproduce#
- In a Claude thread, have the agent start something as a background shell (
local_bash, e.g. a dev server or a long command it no longer needs), then end its turn with a final answer. - Switch to another thread before the turn ends.
- Look at the first thread in the sidebar.
Expected behavior#
The thread reads as finished and unread, like any other thread whose turn ended while I was elsewhere, ideally with a quiet hint that a process from it is still running. With several agents running, the bright/unread row is how I find threads that need me.
Actual behavior#
The row shows "Waiting" ("Monitoring" in 0.0.40), dimmed, for as long as the shell lives, which can be hours. The unseen "Completed" pill and the unread row style never show. When the shell finally exits, the thread lights up as unread long after it actually stopped.
In practice most of my "done" threads end up looking just like threads that are still running, so I can't tell from the sidebar which ones need me.
Impact#
Major degradation or frequent failure
Version or commit#
main @ cc1e634bfa
Environment#
macOS 26.7
Logs or stack traces#
Screenshots, recordings, or supporting files#
No response
Workaround#
No response
vanderlindenma(GitHub profile, opens in a new tab) added labelsbug
vanderlindenma(GitHub profile, opens in a new tab) added labelsneeds-triage
Note
Grok responding on behalf of Julius.
Triage#
Thanks for the clear write-up, @vanderlindenma! I confirmed this on
mainat cc1e634. The turn already counts as finished for alerts, but the sidebar and the mobile thread list still hide that.A background shell that outlives the turn stays on the pending roster as
kind: "command". Whenever that roster isn't empty,presentThreadShellkeeps runtime atidle:The sidebar maps
idletowaitingbefore it checks for an unseen completion, and a waiting row is dimmed even when its completion is unread:https://github.com/pingdotgg/t3code/blob/cc1e634bfa62edd56ff792eea666e436fdef788f/apps/web/src/components/Sidebar.logic.ts#L947-L961 https://github.com/pingdotgg/t3code/blob/cc1e634bfa62edd56ff792eea666e436fdef788f/apps/web/src/components/Sidebar.logic.ts#L927-L936 https://github.com/pingdotgg/t3code/blob/cc1e634bfa62edd56ff792eea666e436fdef788f/apps/web/src/components/Sidebar.tsx#L1253-L1278
The row label works the same way:
waitingwins, and the unreadDonelabel only shows once status is ready. When the shell finally exits, the roster clears, the row leaveswaiting, and the unread style appears late, which matches what you saw. On 0.0.40 these were labeledMonitoringandCompleted; on current main they'reWaitingandDone.Alerts already use a different rule.
backgroundWorkHoldsCompletiondoesn't hold completion forcommand, so the toast, sound, and mobile push fire when the turn ends. Subagents, monitors, and unnamedbackground_taskwork still hold it:https://github.com/pingdotgg/t3code/blob/cc1e634bfa62edd56ff792eea666e436fdef788f/packages/shared/src/orchestrationV2PendingBackgroundWork.ts#L64-L84 https://github.com/pingdotgg/t3code/blob/cc1e634bfa62edd56ff792eea666e436fdef788f/apps/web/src/components/ThreadNotificationCoordinator.tsx#L129-L132
The mobile list has the same gap:
resolveThreadListV2Statusmapsidletowaitingwithout looking at the task kind.Related: this is the sidebar half of closed #13965. The merged #14213 only fixed the alert, and its description said so. It's different from open #3131, where a thread with no visit watermark never counts as unread. Here you opened the thread and left it, so the watermark exists and
waitinghides the completion anyway. It's also not open #13625: subagents and monitors should keep holding completion, because they wake the agent back up.Waitingexists so a thread doesn't flash as done while background work is about to resume (that was the idea behind the closed PR #4415). That still makes sense for subagents and monitors, but not for a command the agent already finished with and left running. A fix could use the same kind split for the sidebar status, the dimmed-row treatment, the unread label, and the mobile list: pending work that's only commands would show the unseen completion, and anything that holds completion staysWaiting. A separate "still running" hint would be nice but isn't needed to fix the missed completion.juliusmarminge removed labelsneeds-triage
juliusmarminge added labelsvia-triage
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Drafted with Claude (Opus 5.5) in Claude Code at the reporter's request.
Before submitting#