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:
MoerAI
2026-05-12 18:56:24 +09:00
parent 75825eb9a6
commit c4e88d63ea
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ export function buildGeminiToolCallExamples(): string {
**User**: "Add a new /health endpoint to the API"
**CORRECT**:
\`\`\`
→ Call Task(category="quick", load_skills=["typescript-programmer"], prompt="...")
→ Call Task(category="quick", load_skills=["typescript-programmer"], run_in_background=false, prompt="...")
→ (After agent completes) Read changed files to verify
→ Call LspDiagnostics on changed files
→ Report