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:
can1357
2026-04-26 00:29:52 +02:00
parent 6bd4cf24fd
commit ecd1554eba
30 changed files with 200 additions and 221 deletions
@@ -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)