Skip to content

fix(core): End a child's stop when its parent sends it new work - #5184

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
core/parent-message-replay
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
core/parent-message-replay

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

On main, a parent message sent after a child's stop ends the stop of the child and of the stopped children below it (chat/child-agents/parent-message.ts, endStopForParentMessage). Parent work from before the stop never runs. On core, a parent message goes to the child's Turn inbox and never reaches appendParentMessage. Core's placement ran it but kept the stop, so the child kept saving its Watch Events as notes and started no Turn for them.

  • decidePlacement (turn-steps/placement-rules.ts) treats a parent message like a person's input while the Conversation is stopped. One sent after the stop ends the stop of the tree through resumeConversationTree, and one sent by the stop is dropped.
  • A replayed parent message has the same idempotency key in the Turn inbox, so it adds no input and ends no later stop. Core needs no copy of main's execution.inboundMessageIds check.
  • Parity case agent-teams:message-ends-child-stop: after a person stops an idle child and its parent sends it a new message, a timer Event on the child starts a Turn on both engines.

via @thomasjiangcy.

--

View Session [Sentry]

@vercel

vercel Bot commented Dec 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Dec 3, 2026 11:16pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 3, 2026
@blacksmith-sh

blacksmith-sh Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
tests/integration/parity/intake-web.test.ts/dashboard intake on core >
intake:web-message-id-matches-transcript >
keeps the API's message id in the transcript
View Logs
tests/integration/turn-metrics.test.ts/Turn metrics >
records a Turn that another Turn superseded
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

This branch was successfully deployed

1 active deployment
Preview – junior-docs — aa928843 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant