feat(subagent): deliver continuable child settlement to parents

A continuable child that stopped without reporting — an error, a token
ceiling, cancellation, teardown — left its parent nothing to act on.
The continuation manager now delivers an unconditional settlement
notice to the durable direct parent before releasing ownership, folding
consumed work (foldConsumedWork supersedes findLastMessageTurnEnd) so a
claimed-but-unrun prompt reads as aborted rather than completed, waking
an idle parent, steering a busy one, and never waking a closing tree.
This commit is contained in:
Hypatia May
2026-08-11 12:31:49 +08:00
parent 76cf6cbd0b
commit 85dd22fd4f
102 changed files with 2139 additions and 345 deletions
@@ -0,0 +1,17 @@
# Snapshot-only overlay pinning quiet report delivery. The shipped default wakes
# the parent on every accepted report, and the runtime's settlement notice wakes
# it again when the child's Activation ends; two independent wakes have no single
# authored order. Quiet delivery leaves settlement as the only wake, while the
# fixture below holds the child until the parent's spawn turn has closed.
- id: base
name: '@deepseek-ai/cordis-plugin-include'
config:
path: ./cordis.yml
patches:
- id: tool-subagent-report
name: '@deepseek-ai/dsh-tool-subagent-report'
config:
reportDelivery: quiet
- id: report-fence
name: './tests/fixtures/subagent-report-fence.ts'