Repository navigation
feat: show running delegated tasks on the Coordinator (#2266) - #2277
Merged
Merged
Conversation
Thread attention now carries hasUnfinishedDelegatedTasks, derived on read from each task's startup, approval, launch, and original turn. Roster changes, the launching state, and settled child turns invalidate the Coordinator's attention so every client hears when the flag flips.
A thread with unfinished delegated tasks reads as running once its own turn ends. Anything that needs the user still wins, and the turn-end toast waits until the last task finishes.
The open conversation keeps its status line after the Coordinator's turn ends, reading Waiting on subagents without the ended turn's steps or clock, and fades it in that shape when the last task finishes.
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.
What
Before this change, a Coordinator whose turn had ended looked idle even while a task it started with
delegate_taskwas still running. The child thread is hidden from the sidebar, so nothing on screen said work was still going on.Now the Coordinator's sidebar row shows the normal running mark while any of its delegated tasks is unfinished. The open conversation keeps its status line, reading "Waiting on subagents" with the layers icon. It shows no step count and no clock, because those belong to the turn that already ended. Both clear when the last task finishes, fails, or is stopped, and the status line fades out in the same shape.
ThreadAttention (thread.attention, broadcast to every client) threadId, waiting, lastTurn, seen + hasUnfinishedDelegatedTasks # derived on read, never storedVerified with the targeted suites (67 server tests, 225 web tests), the contracts, server, and web typechecks, lint, and live captures in Electron.
Why
Users hand long work to delegated tasks and then look away. If the Coordinator reads as idle, they can't tell whether the work is still going or forgotten without opening the task. Closes #2266.
UI Changes
Captured live in Electron. A Claude Coordinator delegates a two-minute shell task with
delegate_taskand ends its own turn.When the task finishes, both clear:
Review Notes
ThreadAttentionSchemais strict, like every wire schema here. A web tab still running a pre-change bundle drops attention pushes until it reloads. The desktop app ships client and server together, so it is not affected.task_statusreports for the same task.Need help on this PR? Tag
@codesmith-botwith what you need.