Repository navigation
Keep threads with running background subagents on the Working shelf - #1423
Merged
Merged
Conversation
A Claude turn that launches a background Agent ends (status done) while the agent keeps running, and the flat sidebar's busy check only looked at status === "working" and forked child threads. The row pill already read "Waiting on N subagents" (isDelegating), but the thread sat in the inbox. isQuietlyWorking now also counts a done/idle thread with a running subagent, matching isDelegating; questions and stalls still win. Subagent rows settle between turns (task-notification) or on CLI exit, and both paths only pushed the detail, so the list never refreshed and the row would have stuck on Working. Both now push threads:changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 4, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug: a thread whose turn launched background subagents (Claude's async
Agentlaunches) showed "Waiting on N subagents" on its row but sat under the finished inbox instead of Working.Root cause:
buildFlatSidebardecides the Working shelf withisQuietlyWorking(src/sidebarGroups.ts), which only checkedstatus === "working". The #1421 family rule covers forked child threads, notthread.subagents. A background agent outlives the turn, so the thread readsdonewhile work continues. The row pill, Kanban, status filter and Agents tab already count running subagents viabuildWaitStates/isDelegating; only the shelf split didn't.Fix:
isQuietlyWorkingalso counts adone/idlethread with a running subagent. This is the same rule asisDelegating, andawaitingInput, stalls andfailedstill send the row to the inbox.ingestTaskNotificationsbetween turns, andfinishRunningSubagentson CLI exit) now pushthreads:changed. Without that, the list never refreshed and the row would stick on Working after the agents finished.Verified on live data: the one thread in the store with running subagents and a non-working status was filed in the inbox before this change.
Tests:
test/sidebarGroups.test.ts: done/idle with a running subagent → Working; settled, asking or failed → inbox.electron/test/claude.test.js: a new fake scenario where the notification lands after the turn's result asserts athreads:changedpush with the settled row. It failed before the runner change.claude.test.js39/39,cursor.test.js30/30.Note: if a task-notification is ever lost, the row stays on Working until the CLI is reaped, which settles any running rows. Today that case only showed a wrong pill.
🤖 Generated with Claude Code