fix(agents): add run_in_background to category task() examples in prompts (fixes #3960)
The task() tool schema declares run_in_background as a REQUIRED parameter, but three prompt-template files contained category-based task() examples that omitted it. When agents copied these patterns into actual tool calls, the runtime validator threw 'run_in_background parameter is REQUIRED', breaking delegation. Add run_in_background=false to the four offending category-based examples: 2 in src/agents/dynamic-agent-category-skills-guide.ts (Delegation Pattern + Category Domain Matching CORRECT/WRONG pair), 1 in src/agents/hephaestus/gpt-5-3-codex.ts (frontend example), and 1 in src/agents/sisyphus/gemini.ts (Example 4 DELEGATE). Subagent-type explore/librarian examples already correctly use run_in_background=true. atlas/shared-prompt.ts examples were already correct. Verification: bun test src/agents/ — 373 pass, 0 fail. bun run typecheck — clean. Grep confirms no remaining category task() examples lack the parameter.
This commit is contained in:
@@ -381,6 +381,7 @@ When delegating, ALWAYS check if relevant skills should be loaded:
|
||||
task(
|
||||
category="visual-engineering",
|
||||
load_skills=["frontend-ui-ux"],
|
||||
run_in_background=false,
|
||||
prompt="1. TASK: Build the settings page... 2. EXPECTED OUTCOME: ..."
|
||||
)
|
||||
\`\`\`
|
||||
|
||||
Reference in New Issue
Block a user