Skip to content

Publish Subagent function calls on the Session stream - #851

Merged
SaladDay merged 2 commits into
mainfrom
publish-subagent-function-calls-on-the-session-stream
Oct 24, 2026
Merged

SaladDay merged 2 commits into
mainfrom
publish-subagent-function-calls-on-the-session-stream

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Publishes a Subagent's function_call Item once as agent.session.turn.item.added (child Turn ID as turn_id) when Core records the call, and lets a tool_result naming that child Turn resolve to the root Turn holding the call. The child Item identity is derived from the child Turn and the executor call ID, so a matching identity proves the call was made in that Turn; no schema change. Docs: subagents.md, execution-tools.md and zh.


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

A Subagent's function call now publishes its function_call Item as agent.session.turn.item.added with the child Turn ID, and a tool_result naming that child Turn resolves to the root Turn holding the call, as the official SDK sends it.
@SaladDay
SaladDay merged commit 11cea5b into main Oct 24, 2026
19 checks passed
@SaladDay
SaladDay deleted the publish-subagent-function-calls-on-the-session-stream branch October 24, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant