You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An agent's message to a stopped agent runs ahead of the messages held in its queue #580
Upstream queues a new message only when a turn is running on the thread. A held queue does not count as running. So after an agent is stopped with messages A and B held in its queue:
Message C arrives from an agent and starts at once, ahead of A and B.
When C's turn ends, A and B are still held. Nothing releases them.
A message that arrives while C is running joins the held queue and is held too.
For a person this is upstream's design: they see the held messages above the composer, and choose between Resume and sending something new. An agent sender sees none of that and did not choose to jump.
Not seen in live data yet (two held turns ever, both removed before another message arrived). Found by reading the code at Orchestrator.ts (shouldQueue requires an active run).
Decided
Jackson, 2026-10-12: everything goes in order. "Receiving messages out of order is confusing for agents, I've seen that be the case."
When a message sent by an agent arrives at an idle receiver with a held queue, J5 resumes the queue and the new message goes to the back. This is a rule on J5's own delivery path:
No change to upstream's code, and none to what a person's message does.
The agent that did the stopping gets no exception: its new direction also waits behind the held messages.
An agent message therefore releases a hold that upstream leaves in place. Record it in D4 of the register, and update the j5_stop_agent and j5_stop_crew descriptions, which say today that a later message runs ahead.
Scope settled with Jackson, 2026-10-12, while building:
Any hold is released, not only a Stop. Upstream holds a queue after a Stop, a restart and a provider failure, and does not record which. A delivery to an idle agent resumes the queue in all three. Accepted.
Every J5 delivery follows the rule, platform notices and a person's reply through the ledger included, not only messages agents send.
A receiver on a usage limit is the exception. Upstream refuses to resume its queue, so the delivery waits unsent, rechecked like any held delivery with no alarm, and joins the back once the thread continues. The check is upstream's own usageLimitBlockedRun.
Confirmation that the jump is upstream's design: the comment on runRanAfter in packages/shared names "a message sent while the queue is held" as a run that starts ahead of a held queue.
Activity
Jacksondr5 commentedon Oct 13, 2026
Scope settled with Jackson, 2026-10-12, while building:
usageLimitBlockedRun.Confirmation that the jump is upstream's design: the comment on
runRanAfterinpackages/sharednames "a message sent while the queue is held" as a run that starts ahead of a held queue.fix(j5): a message to an agent with a held queue runs after the held …