Update the in-process provider READMEs and add an upgrade guide for the initial task source change.
1.7 KiB
kind, description
| kind | description |
|---|---|
| upgrade-guide | In-process continuable subagents record their initial delegated task as an agent-message from the parent agent instead of a user message. |
Subagent initial tasks are agent messages
English | 中文
Change
In-process continuable subagents started by subagent-spawn-in-process or subagent-fork-in-process record the initial delegated task as a message from the parent agent. Its user/message source changes from { "kind": "user" } to { "kind": "agent-message", "form": "relay", "senderSessionId": "<parent Session id>" }, and its content starts with a text block Agent <parent name> sent a message: before the task blocks. Child Session logs, SDK Session event notifications, and Python SDK results show the new form. Sessions written earlier keep the old form.
Consumers that treat user sources as human input no longer apply to the task: $skill mentions in it do not load skills, Session references in it are not expanded, Markdown export and the turn outline omit it, and a child without human messages gets no fallback title. Direct human messages to a child keep the user source and their original content.
Migration
- Where code finds a child's task as its first
user-source message, match anagent-messagesource whosesenderSessionIdequals the child Session'sparentSession, and drop the first content block to read the task text. Keep acceptinguserfor Sessions written before the upgrade. - Where a delegated task relies on
$skillto load a skill, name the skill in the task and let the child call theskilltool. - Confirm by starting a continuable child and checking that its first non-context
user/messagehas theagent-messagesource and the sender prefix.