You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Sidebar hides a finished thread's unseen completion while a background shell it left running is still alive #14872
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.
Thanks for the clear write-up, @vanderlindenma! I confirmed this on main at 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, presentThreadShell keeps runtime at idle:
// Status hues follow the system-wide convention set by sidebar v1 and the
// mobile Live Activity/widgets (amber approval, indigo input, sky working)
// so a thread reads the same color everywhere it surfaces.
consttopStatus=
status==="working"
? {
label: "Working",
icon: "working"asconst,
// No shimmer: a label that animates forever is noise in a sidebar
// full of them (and repaints every vsync on high-refresh displays).
className: "text-info",
}
: status==="waiting"
? {
// Waiting is calm background presence (post-settle background
// roster), not active progress, so the label keeps full strength.
label: "Waiting",
icon: null,
className: "text-muted-foreground",
The row label works the same way: waiting wins, and the unread Done label only shows once status is ready. When the shell finally exits, the roster clears, the row leaves waiting, and the unread style appears late, which matches what you saw. On 0.0.40 these were labeled Monitoring and Completed; on current main they're Waiting and Done.
Alerts already use a different rule. backgroundWorkHoldsCompletion doesn't hold completion for command, so the toast, sound, and mobile push fire when the turn ends. Subagents, monitors, and unnamed background_task work still hold it:
The mobile list has the same gap: resolveThreadListV2Status maps idle to waiting without 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 waiting hides the completion anyway. It's also not open #13625: subagents and monitors should keep holding completion, because they wake the agent back up.
Waiting exists 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 stays Waiting. A separate "still running" hint would be nice but isn't needed to fix the missed completion.
Activity
vanderlindenma commentedon Oct 2, 2026
Drafted with Claude (Opus 5.5) in Claude Code at the reporter's request.
Before submitting
juliusmarminge commentedon Oct 2, 2026
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:t3code/packages/client-runtime/src/state/models.ts
Lines 166 to 171 in cc1e634
The sidebar maps
idletowaitingbefore it checks for an unseen completion, and a waiting row is dimmed even when its completion is unread:t3code/apps/web/src/components/Sidebar.logic.ts
Lines 947 to 961 in cc1e634
t3code/apps/web/src/components/Sidebar.logic.ts
Lines 927 to 936 in cc1e634
t3code/apps/web/src/components/Sidebar.tsx
Lines 1253 to 1278 in cc1e634
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:t3code/packages/shared/src/orchestrationV2PendingBackgroundWork.ts
Lines 64 to 84 in cc1e634
t3code/apps/web/src/components/ThreadNotificationCoordinator.tsx
Lines 129 to 132 in cc1e634
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.