Repository navigation
feat(subagents): Let a running child read parent messages - #2139
Merged
Merged
Conversation
… step A messageAgent call to a busy child used to wait for the child's current work. The child now reads it as a steering message before its next model call, and its running agent invocation reports for both. The queued agent invocation ends as steered. Messages keep defer delivery so they never run ahead of a paused child, and a message with another Actor or other credentials still waits. Refs #2105 Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The integration case ran the agent, which the test architecture check does not allow in packages/junior/tests. Test the worker drain contract with a fake runner instead.
…rain A drain that saved parent messages in the Turn but failed to mark their agent invocations left them pending, so the next drain read them again. Skip messages that the Turn checkpoint already has and only mark them.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 65376cc. Configure here.
Fold the Actor check into the drain loop, drop checks that always pass, and shorten the README and test. Co-Authored-By: David Cramer <[email protected]>
The retry check compared raw parent text against saved steering text. The Turn saves that text wrapped and XML-escaped, so a message with quotes, & or <> did not match and the child read it twice. Build the steering Pi message and compare it to the saved message instead.
dcramer
approved these changes
Oct 15, 2026
dcramer
left a comment
Member
There was a problem hiding this comment.
it would be nice - as mentioned in previous runs - if this shared the same logic vs having to reimplement it form the parent agent as much as possible
The child steering drain had its own check for a steering message that the Turn already saved. Slack had the same check in two places. Move the Slack key into withoutSavedSteeringMessages beside buildSteeringPiMessage, and use it in all three places.
11 of 35 tasks
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.

Part of #2105. Until now, a parent's
messageAgentmessage to a busy child waited for the child's current work to end. So the parent could not correct a child during a long task.Now a running child reads a queued parent message as a steering message before its next model call. A running tool is never interrupted. The message's agent invocation ends as
completedwith the newparentMailboxStatus: "steered". The running agent invocation reports for both, so the parent still gets one result.defermailbox delivery. Withinterrupt, a message could start an attempt while the child is paused between slices. The agent invocation worker drains them with a newdeferred: trueoption onInboxAttempt.drain.withoutSavedSteeringMessagescheck that Slack uses for repeated mailbox deliveries. It acknowledges messages that were already marked.listAgentsdoes not usesteeredagent invocations forstatusorlast_result.replaced, as before.Not in this change: messages between siblings, and a root parent that reads a child's message while it is running.
via David Cramer.
--
View Junior Session [Sentry]