Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Sidebar hides a finished thread's unseen completion while a background shell it left running is still alive #14872

Closedvanderlindenma(GitHub profile, opens in a new tab) opened this issue 2 comments

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

  1. 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.
  2. Switch to another thread before the turn ends.
  3. 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

  1. vanderlindenma(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Drafted with Claude (Opus 5.5) in Claude Code at the reporter's request.

    Before submitting

    • I searched existing issues and did not find a duplicate. Related: #13965 reported this together with the missing alert. Its fix, #14213, changed only the alert: "The sidebar and the mobile list still show Waiting while a dev server runs." This issue is about that sidebar half. #3131 is a separate cause of the same symptom (a thread with no recorded visit never reads as unread). #13625 is the opposite case (subagents and monitors that wake the agent), which this request should not change.
  3. Note

    Grok responding on behalf of Julius.

    Triage

    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:

    https://github.com/pingdotgg/t3code/blob/cc1e634bfa62edd56ff792eea666e436fdef788f/packages/client-runtime/src/state/models.ts#L166-L171

    The sidebar maps idle to waiting before 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: 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:

    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: 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.

  4. juliusmarminge removed labelsneeds-triage

  5. juliusmarminge added labelsvia-triage

Sign in to join this conversation.