Repository navigation
feat(delegation): wake the Coordinator when a delegated task finishes - #2278
Merged
Merged
Conversation
…claimed A message cut at its size limit still settled every claimed task, so a result whose section was truncated away was never delivered. Select whole sections against the budget before claiming and let the existing rerun deliver the rest.
The wake message arrives as a user-role turn but carries text written by delegated agents. Open it with one line saying so.
…inator Stopping a child from the UI returned through the acknowledging report, so the Coordinator never heard about it. Only the Coordinator's own task_cancel acknowledges.
The wait recomputed each child's notice key after awaiting its audit write, so a result that landed in between was acknowledged without being returned. Capture the keys when the observation is read.
chuks-qua
force-pushed
the
feat/issue-2217
branch
from
October 21, 2026 16:25
8f4c772 to
5b0f078
Compare
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 that delegated a task with
delegate_taskheard nothing back. The child finished, failed, or waited on the user, and the Coordinator stayed idle until the user prompted it again.Now the server wakes the Coordinator when a delegated task finishes, fails, is cancelled, or blocks on the user:
Each result is delivered once. A durable ledger on
delegated_tasksrecords which result each Coordinator has seen:A result the Coordinator already read through
task_status,thread_wait, or its owntask_cancelcounts as delivered, so it is not sent again. A user Stop on the child still reaches the Coordinator. Stopping the Coordinator does not stop the child, and the later result is still delivered.Verified with server tests for the ledger, wake service, steer delivery, and boot recovery, web tests for the dock, roster, and timeline row, and live Electron runs with Claude.
Closes #2217
Why
Users delegate work so they can step away. Without a wake-up, every delegation needed a manual "check on it" prompt, and a child blocked on an approval sat unseen in another thread.
UI Changes
Child finished. Before, the roster shows Done but the Coordinator stays idle:
After, the Coordinator wakes with a "From Count files" row and answers with the result:
Child blocked on the user. Before, the Coordinator thread shows no dock entry:
After, the child's approval shows in the Coordinator's dock and the roster shows Waiting:
After approving from the dock, the child finishes and the Coordinator wakes again:
Config Changes
None.
Review Notes
0097_parallel_madelyne_pryoradds nullablenotice_deliveredandnotice_claimcolumns todelegated_tasks. It backfillsnotice_deliveredfor tasks that had already ended, so an upgrade does not wake Coordinators with old results. Older builds never read either column, so it is registered inCOMPATIBLE_STEPS.request_user_input) in the dock. The Codex child ran in Default mode, where the tool is unavailable. Tests cover the question path, and the tool-approval path was verified live.server-bootstrap.tshooks that refresh the roster on child approval changes have no direct test. The service method they call is tested, and the live capture shows the roster moving to Waiting and back.Need help on this PR? Tag
@codesmith-botwith what you need.