Repository navigation
Replies: 1 comment
Follow-up: a
|
| Delivery | Wakes an idle parent | Preserves report-before-settlement order | Avoids one later turn per queued report |
|---|---|---|---|
wakeup / followup() |
Yes | No | No |
quiet / inject() |
No | Yes | Yes |
proposed steer / steer() |
Yes | Yes | Yes |
Adding a mode is safer than silently changing the existing wakeup semantics because deployments may rely on reports opening ordinary later turns.
A focused regression test could keep the parent busy, deliver report A, settle the child with closing output B, and assert that the parent's next model-visible boundary contains A before B without opening a stale later turn for A.
Uh oh!
There was an error while loading. Please reload this page.
Summary
A continuable child can send a
subagent-report, continue working, and later finish with a newer closing message. When its parent is busy, DSH can deliver these messages to the parent in the opposite order:next-turninbox.next-stepinbox.next-turnand starts another model turn for it.The parent therefore sees a child's final result before an earlier report. The delayed report may be stale or contradict the result the parent already processed.
With several children, every queued report can also start a separate follow-up turn.
Reproduction
reportwith an intermediate conclusion.The behavior does not require process restarts, cancellation, HMR, or a race involving an unavailable parent.
Observed example
A real DSH session had one L1 subagent start three L2 subagents.
The L1 session received:
subagent-reportmessages innext-turnsubagent-settlednotices innext-stepOne child sent an initial blocker report. After the parent challenged that finding, the child sent a second report retracting it and then finished with the retraction as its closing message.
Another child sent a report whose opening sentence said that release was blocked, although the evidence later in the same report supported release. It then finished the same turn with a closing message that explicitly said the release could proceed.
The L1 parent consumed the settlement closing messages during its original turn and produced a final
GOconclusion. It then entered four additional turns, one for each previously queued report:The parent had already processed the corresponding closing messages before these four turns.
The Web UI accurately showed four
Context injection · subagent-reportrows and fourContext injection · subagent-settledrows. This was not a UI duplication or duplicate session-log insertion: each report had one stable message ID, one inbox insertion, and one later claim. The problem was cross-inbox delivery order.Why this happens
The report tool explicitly permits continued work:
https://github.com/deepseek-ai/deepseek-harness/blob/main/packages/subagent/tool-subagent-report/src/index.ts#L57-L61
For
reportDelivery: "wakeup", report delivery usesparent.followup(message), which queues the message fornext-turn:https://github.com/deepseek-ai/deepseek-harness/blob/main/packages/subagent/subagent/src/continuation.ts#L629-L650
https://github.com/deepseek-ai/deepseek-harness/blob/main/packages/subagent/subagent/src/continuation.ts#L677-L686
Settlement delivery behaves differently. If the parent is busy, it calls
parent.steer(message), which queues the settlement notice fornext-step:https://github.com/deepseek-ai/deepseek-harness/blob/main/packages/subagent/subagent/src/continuation.ts#L1400-L1442
Inbox.claim()consumes all pendingnext-stepmessages, but only onenext-turnmessage when opening a turn:https://github.com/deepseek-ai/deepseek-harness/blob/main/packages/core/agent/src/inbox.ts#L68-L77
These rules allow a later settlement message to overtake an earlier report from the same child. Multiple reports left in
next-turnthen create multiple additional turns.Actual behavior
Expected behavior
Model-visible delivery should preserve causal order for messages from one child.
At minimum:
The report and settlement contents cannot be deduplicated by text. A child may legitimately send an interim report and later finish with a different result.
Possible directions
Any fix should preserve report durability and child-to-parent authority while preventing cross-inbox reordering. Potential approaches include:
next-stepwhen the parent is already running, matching busy-parent settlement delivery;The first requirement is ordering. Batching is a related cost issue but does not by itself prevent stale conclusions.
Acceptance criteria
All reactions