Sub-agent message queue: no way to inspect, delete, or reorder pending messages - stale messages still get delivered #4631
Replies: 3 comments
|
Thanks for the precise queue-control report, @schwarztim. I implemented and tested a reference for the bounded list + cancel subset against current
The root control plugin adds:
Authority and races are intentionally narrow. Initial input, active work, child-local/plugin context, internal notices, and coordinator relays attributed to another sender are neither listed nor cancellable. A stale/wrong parent, ancestor, host-user address, or non-resident/closing child cannot use this control, and inspection never cold-resumes a child. Cancel-first removes the id before any later claim; claim-first returns Verification includes 302 passing package/catalog tests plus an assembled keyless ACP replay that holds a real child, queues two messages, pages the list, cancels the first runtime-minted id, admits only the survivor, and verifies the child's durable log contains the canceled splice but no canceled I deliberately left reorder, move-to-front, priority, replace, and non-resident/cross-process mailbox control out of this patch; those need separate ordering, identity, lease, and claim semantics. This is a reference implementation for review, not an upstream merge or adoption claim. |
|
@Jstn-1g's list + cancel reference covers your asks 1 and 2. I want to flag a constraint on asks 3 and 4 that I do not think has been stated, because it decides whether they can be built at all in the current shape. The pending
So the queue you want to reorder contains at least two kinds of item:
Why this matters for each of your asks:
None of this argues against your asks. It argues that the API should be scoped to follow-ups by construction — Worth adding to the report: the distinction above is invisible from the outside — from a user's seat the queue looks like a list of messages you sent. If the eventual Interest disclosure: I maintain a third-party DSH plugin and ship subagent functionality through it, so I am not neutral here — which is why I am pointing only at DSH's own source and at another user's thread, and proposing nothing of mine. The native subagent runtime and its inbox are DSH's; we do not touch them and could not implement any of this. |
|
Thank you for tracing this to the actual inbox and to #4696. That is exactly the boundary the reference enforces: The current tool description and README also call out that an empty list means “none of your pending follow-ups,” not “the child inbox is empty.” I agree that any future replace/reorder operation would need to be defined over that eligible subsequence and preserve every ineligible entry and its relative order; a raw inbox clear or reorder would be unsafe. That extra atomicity/order contract is why this reference deliberately stops at bounded list + cancel. |
Uh oh!
There was an error while loading. Please reload this page.
Sub-agent message queue: no way to inspect, delete, or reorder pending messages
Environment:
@deepseek-ai/dsh0.1.1-rc.2, Windows 11, installed via npx.Description
Messages sent with
send_messageto a busy sub-agent are parked in its inbound queue and delivered one by one as the agent finishes turns. Currently there is no way to:Why this matters
In practice, while a sub-agent is working you often send follow-up corrections. If several of them pile up, earlier ones can become stale or contradictory — but they will still be delivered in the original order. Consequences:
The only escape hatch today is
interrupt_agent, which is too coarse: it stops the current turn but leaves the queue untouched, and it cannot express something like "drop the two older messages, deliver this one next".Expected behavior
Any subset of the following would fix the pain:
send_messageoptions such aspriority: urgentand/orreplace_pending: true, so "cancel the old ones + insert this one" is a single step.Happy to provide more reproduction details if useful. Thanks!
All reactions