Repository navigation
feat(j5): tell the sender when a message waits on a held or usage-limited agent - #710
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 17 minutes for your next included review. View limit details
Comment |
…ited agent A send to an agent whose queue is held, whose worktree setup failed, or that stopped on a usage limit now returns a deliveryNotice saying the message is saved, when it will run, and not to send it again. The hold rules are shared with the delivery path through idleQueueHold. Closes #272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
j5code/held-delivery-notice-272
branch
from
October 25, 2026 03:23
b8b2182 to
588e4f4
Compare
This branch was successfully deployed
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.
Problem
When an agent sends with
j5_send_messageto an agent whose delivery won't run soon, the sender is told nothing. Three cases: the receiver's queue is held, its worktree setup failed, or it stopped on a usage limit. The message waits, but the sender can't tell it isn't lost, so it may send it again or wait for nothing. Closes #272.What changed
The send result's
deliveryNoticenow covers these cases, with the approved wording. The templates sit besidereceiverBacklogNoticeinenvelopes.v1.json:<receiver>hit its provider's usage limit and continues automatically at<resetAt>. Your message is saved and will run then, in the order it was sent. Don't send it again."<receiver>'s queue is on hold, so your message waits until a person resumes it. …"How each case is detected:
readReceiverBacklogreturns a discriminated result:behind_turn,usage_limitorqueue_held.withDeliveryNoticerenders whichever one applies.DeliveryTransportintoidleQueueHold, so the notice and the delivery decide "held" the same way. The delivery's behaviour is unchanged.limitRecoveryis armed withautoResumefor this run and thisresetAt.getThreadRecords). Error turn items are read only for the latest run, and only when that run failed.Docs: the
j5_send_messageResult paragraph indocs/j5/product/a2a/agent-tools.mdis rewritten, with a History line. The tool description's sentence ("deliveryNotice says when your message will wait behind the receiver's current turn") is still accurate, so it is unchanged and the pinned string stays byte-identical.#705 (upstream advance to v0.1.3): that branch rewrites the steer/queue section of
deliverAgentjust below the hold block. It doesn't touchreceiverBacklog.ts,envelopes.v1.json,EnvelopeFormatter.tsor the hold conditions. This PR only edits the hold block above its hunk, so the two should merge cleanly.Live testing
Not run live. The change is server-only. The tests in
DeliveryTransport.integration.test.tsrun the real orchestrator, event sink and A2A send service on SQLite and pin each notice's exact text:thread.metadata.updatethe banner's "Resume at reset" sends)A real usage limit can't be triggered on demand, so the usage-limit cases are tested only here, not live. The held-queue case can be reached live: stop a busy agent, start it on a new message from the composer, then message it from another agent.
Checklist
j5_send_messageis the only entry point for the notice. It is not shown in any client. It is computed for local agents only, as the backlog notice is. Provider-independent.docs/j5/product/a2a/agent-tools.mdrewritten where this changes itVerified:
vp test runforDeliveryTransport.integration.test.ts,EnvelopeFormatter.test.ts,PeerRoundTrip.test.tsandsrc/j5/a2a/mcp(all pass). A mutation check confirmed each new test fails when its branch is removed. Servertypecheckexit 0; lint and format clean onsrc/j5/a2a.Built by Claude Opus 5.5 in Claude Code (J5 Code).
🤖 Generated with Claude Code