Repository navigation
Show a Waiting status while a thread has running background tasks #23260
Replies: 8 comments
|
same problem here |
|
Adding a use case for this issue, since it pulls the other way from #14872 / #14910. Our agents start long jobs with In our local build we treat a non-empty background roster as Waiting again (the pre-#14910 rule in So the core problem seems to be that the roster's |
|
Real case from today (nightly, Claude Opus 5.5). Two threads in one project both ended their turn to wait on test suites:
So today it depends on whether the agent happened to start a Monitor. #22055's One more thing would help: B's suites were stuck for 15+ minutes behind A's suite on a machine-wide test lock. "Waiting · e2e:markets" looks the same whether the job is running or blocked. Showing how long each job has been running, and the last line of its output on hover, would make that visible without opening the thread. |
|
Additional observed case on 0.1.1-nightly.20261020.3411, commit The thread briefly returned to the inbox as finished, then moved back to Working without user input. Read-only inspection of persisted events and replay of the installed build's pending-background-work functions explain the transition. On 2026-10-20, all times UTC:
The agent had explicitly said it was waiting for the final CI job before finishing its deliverable, so this command was awaited work. This matches the installed kind-based hold rule: commands return false, while subagents, monitors and background tasks return true. The status pill uses that same helper. For comparison, replaying the earlier parent completions at 13:14:14.173 (two active delegates) and 13:18:13.403 (one active delegate) returned true. This particular gap therefore supports the awaited-command case in this issue and #22055; it does not establish a separate premature-completion bug for active subagents. Verification limits: the brief visual transition was user-observed, without a screen recording. The timestamps, roster and automatic wake were verified from durable events; the hold rule was executed from the installed bundle. No application state was modified and no fresh minimal reproduction was run. |
|
Additional evidence for the awaited-command case, from a Claude Opus 5.5 PR workflow on macOS today (2026-10-20), waiting for checks on #22382. Read-only inspection of the persisted event log gives this timeline (UTC):
At the parent completion there were no active subagents, no active foreground run, and no registered PR watch. The remaining work was the CI-wait command. That leaves roughly eleven minutes where the agent still owed a follow-up but its run was completed. Executing the current checkout's Verification limits: the Done badge was user-observed without a recording, and this is a matching historical case rather than a fresh minimal reproduction. The timeline and roster were verified from durable events; the helper check used the current source checkout, not the installed bundle. No application state was modified. |
|
Adding our use case: we regularly have threads whose whole job is babysitting a PR — watch checks, triage review bots, push fixes — and they end their turn with a background wait. With the Working section enabled in the sidebar, those threads drop into Ready/Completed and look identical to threads that are genuinely finished. The angle the existing comments haven't covered: waiting threads are exactly the ones we want to prompt next. When the wait resolves (CI goes green, a reviewer replies), that thread is primed for a follow-up prompt, but there's no way to find "just waiting" from the list — you have to open each thread and look for the composer's +1 on the Note Written with Claude Code (model: |
|
Workaround we've settled on while waiting for this — sharing in case it helps others with the same pain: Since a PR watch is an awaited task, whatever thread holds it sits in the Working section until merge/close. So instead of each PR-owning thread watching its own PR, we run one dispatcher thread that holds the watches for the whole fleet:
Net effect: exactly one thread in Working (the dispatcher, deliberately labeled), every PR thread purely waiting in the inbox and woken only when its PR has news, and near-zero incremental API usage no matter how many PRs are watched. It works, but it's a workaround shaped entirely around the missing Waiting state — the dispatcher thread is a stand-in for "these threads are waiting, not working." Would still very much like the real thing here: a Waiting distinction in the sidebar (and on the API surface) so this routing layer can be deleted. Note Written with Claude Code (model: |

Uh oh!
There was an error while loading. Please reload this page.
Problem
A Claude agent can start a long-running shell command with
run_in_background(for example, full local CI) and then end its turn. T3 then marks the thread Completed (status: completed,activeRunId: null), even though the composer still showsRunning: Run full local CI on batch branch · Stop. When the command exits, the agent wakes up and starts a new run.In the sidebar, the thread looks finished or stale while work is still happening. From the list, you can't tell whether the thread is idle or waiting on CI.
Proposal
Waiting · Run full local CI.backgroundTaskslist orwaitingOnfield ont3_thread_read/t3_thread_list), so orchestrating agents can tell the difference too.Related
#16611, #16610, #17767: the same root problem (completed vs. still working) for subagents and
/goal.All reactions