fix(runtime): preserve child agent report identity - #134
Merged
Conversation
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.
Summary
from_agent_nameandfrom_session_thread_idwhen projectingagent.thread_message_receivedinto model contextProblem
A child Thread report woke the primary Thread correctly, but the model projection discarded its sender metadata and presented only the report content as a plain user-role message. The coordinator could therefore mistake a worker report for content authored by the Session user and fail to continue orchestration.
Compatibility basis
The public Managed Agents multi-agent contract defines
agent.thread_message_receivedas a report or question sent to the coordinator and includesfrom_session_thread_id,from_agent_name, andcontent: https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#primary-thread-eventsThe public HTTP event shape, persistence schema, and Temporal wakeup path are unchanged. The change affects only provider-facing context projection and private coordinator system guidance. Existing persisted cross-Thread events are projected through the new envelope on their next model turn, including legacy events whose sender metadata is absent.
Validation
make verifymake docs-checkmake local-configmake test-service