feat: renamed subagent handoff flow to use yield instead of submit_result
- Renamed subagent completion flow from `submit_result` to `yield` across SDK tools, prompts, and docs. - Updated executor/task handling to require and parse `yield` calls, replacing legacy submit-result extraction and state flags. - Added `subagent-yield-reminder` and updated system prompts to require `yield` with `result.data` or `result.error`. - Renamed hidden-tool and registration plumbing to `yield`, including discovery helpers and renderer/test surface.
This commit is contained in:
@@ -221,9 +221,9 @@ export function parseAgentFields(frontmatter: Record<string, unknown>): ParsedAg
|
||||
|
||||
let tools = parseArrayOrCSV(frontmatter.tools)?.map(tool => tool.toLowerCase());
|
||||
|
||||
// Subagents with explicit tool lists always need submit_result
|
||||
if (tools && !tools.includes("submit_result")) {
|
||||
tools = [...tools, "submit_result"];
|
||||
// Subagents with explicit tool lists always need yield
|
||||
if (tools && !tools.includes("yield")) {
|
||||
tools = [...tools, "yield"];
|
||||
}
|
||||
|
||||
// Parse spawns field (array, "*", or CSV)
|
||||
|
||||
Reference in New Issue
Block a user