fix(agent): steered override-schema subagents

- Marked eval agent schema calls as caller overrides so subagent prompts can revoke native output/yield instructions.\n- Added override-schema prompt guidance telling agents to ignore conflicting native output labels and terminal-yield the caller schema object.\n- Added prompt coverage for the override notice.\n\nRefs #3926
This commit is contained in:
roboomp
2026-06-30 22:30:15 +00:00
parent ca3acaa61a
commit 00ef58f843
5 changed files with 36 additions and 0 deletions
@@ -295,6 +295,11 @@ export interface ExecutorOptions {
parentActiveModelPattern?: string;
thinkingLevel?: ThinkingLevel;
outputSchema?: unknown;
/**
* Caller supplied a schema that supersedes the agent's native output prompt.
* Eval `agent(..., schema=...)` sets this so built-in agents ignore stale yield labels.
*/
outputSchemaOverridesAgent?: boolean;
/** Parent task recursion depth (0 = top-level, 1 = first child, etc.) */
taskDepth?: number;
/**
@@ -2141,6 +2146,7 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
planReferencePath: options.planReference?.path ?? "",
worktree: worktree ?? "",
outputSchema: normalizedOutputSchema,
outputSchemaOverridesAgent: options.outputSchemaOverridesAgent === true,
ircPeers: ircEnabled ? renderIrcPeerRoster(id) : "",
ircSelfId: ircEnabled ? id : "",
});