Repository navigation
fix: skip child-turn notices for children waiting on CI or that already messaged the parent - #375
Merged
Merged
Conversation
…dy messaged the parent An orchestrator woke for a full turn on every child Stop, and most of those turns were a one-line acknowledgement. Two notices now aren't sent: - the child is waiting_on_external (CI, a reviewer, its tasks, subagents or a wake-up): the parent can do nothing yet, and ccs watch nudges the child when a check fails. A question still gets through, since waiting_on_user is decided first. - the child sent the parent a SendMessage at any point in the turn, not only as its last tool call. A message queued mid-turn no longer clears what the turn already sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brtkwr
enabled auto-merge
November 20, 2026 14:01
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.
Opus 5.5 ✨
Orchestrators were woken for a full turn every time a child finished one, and most of those turns did nothing. This stops the two kinds of notice that were mostly waste:
waiting_on_external(CI running, a reviewer, its own tasks, subagents or a wake-up). The parent can't act yet, andccs watchalready nudges the child when a check fails. A child that asks a question still gets through, becausewaiting_on_useris decided beforewaiting_on_external.SendMessageat any point in the turn, such as a HANDOVER followed by more work. Before, only a SendMessage as the turn's very last tool call counted. A message queued mid-turn no longer clears what the turn had already sent.Idle, done and waiting-on-user notices are unchanged, so a child that goes quiet without reporting is still told.
Why: what the notices cost
Measured on 20 Nov from every transcript under
~/.claude/projectsmodified since 3 Nov, plus everychild_turnline inpr-events.jsonl. These are complete counts, not samples. Effective tokens use ccs's own weights (input 1x, 1h cache write 2x, cache read 0.1x, output 5x) priced at $5 per million.orchestrator, the rest to three sub-orchestrators.waiting_on_external270,idle142,waiting_on_user31,done1.waiting_on_externalThe second row is an estimate, because transcripts don't mark where a child's turn began. It counts notices where the child had messaged that parent in the 10 minutes before.
The daily totals don't show the notices causing a jump. Spend rose to 320-380M effective tokens a day on 17-18 Nov, before any notice existed. The notices were about 17% of 20 Nov's spend.
Tests
TestChildTurnSkipsSentEarlierAndWaitingchecks four cases:The new tests pass locally under
-race -count=2. CI runs the full suite.🤖 Generated with Claude Code