Repository navigation
fix(subagents): Run child watch events as agent invocations - #2134
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 03de0c1. Configure here.
sentry-junior
Bot
force-pushed
the
fix/child-agent-watches
branch
from
October 14, 2026 21:10
d089a73 to
2882720
Compare
Contributor
|
4 screenshot changes — 4 changed · 0 added · 0 removed Review screenshots in Frameshift
|
A child agent's timer or watch event reached the root turn worker, which needs a Destination, so it failed and dead-lettered. Child mailbox input now goes through one path: results, messages, and watch events each start an agent invocation on the child that reports to its parent. Watch events follow the root Event Turn rules: same burst window, event system Actor, and timer credential subject. They count toward the child's automated-turn limit; a task or message from the parent resets it. Stopping a child ends the watches of its whole tree. Child prompt mode, reportBlocked, and messageAgent now key off parentConversationId instead of the Source. Co-Authored-By: David Cramer <[email protected]>
A stop now records junior_conversations.stopped_at for every Conversation it stops, after their watches end. The worker drops watch events, agent results, and agent messages received at or before that time, so an idle child no longer runs an event that reached it before the stop. Roots and children use the same session stop: the Slack stop keyword calls stopConversationSession, which ends the root's watches, records the stop, and stops its child agents. stopAgent records it the same way. listAgents shows a child as stopped until a later agent invocation starts on it, and stopAgent reports stopped: true for an idle child. Co-Authored-By: David Cramer <[email protected]>
sentry-junior
Bot
force-pushed
the
fix/child-agent-watches
branch
from
October 14, 2026 21:35
cea834a to
27b40af
Compare
dcramer
approved these changes
Oct 14, 2026
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.

A child agent's watches failed. A timer that a child set went to the root turn worker, which needs a Destination, and a child has none. The event dead-lettered after five retries (Sentry issue 7792281477).
Child watch events now take the same path as child results and messages from #2135: each batch starts an agent invocation on the child, and its result goes to the parent. It follows the root rules for an Event Turn: the same burst window, the event system actor, and a timer's own grants.
spawnAgenttask ormessageAgentmessage from the parent resets the count.child_agentprompt,reportBlocked, andmessageAgentdepend onparentConversationId, not on the input source, so a child woken by a watch keeps them.listAgentsdoes not show a watch event as the child's task.Session stop. A new
junior_conversations.stopped_atcolumn (migration 0053) records a stop the same way for roots and children. A stop ends the watches of the conversation and everything under it, then recordsstopped_at. The worker drops watch events, agent results, and agent messages received at or before it, so an event already queued for an idle child no longer runs.stopAgentand the Slackstopkeyword both use it; the stop button still only interrupts the current turn. A stopped idle child now showsstoppedinlistAgents, andmessageAgentstarts it again.Tool audit:
handoff,interactive-auth, and nesting pastmaxAgentDepthstay off for children. Automation tools,slackPublicSearch, andaddReactionalready need a Slack source. Slack write tools such assendFilesstay on, so a child can post in the root thread, as a root event run can.Follow-up: a limit for parent → child → parent loops (#881).
Tests: a child timer runs as the event actor, reports to the parent, counts toward the turn limit, is dropped after a stop, and works again after
messageAgent. A root timer is dropped after a session stop, and a watch set later still fires.via David Cramer.
--
View Junior Session [Sentry]