From 457fe9eb268f381610f9da97357b5d1695de3201 Mon Sep 17 00:00:00 2001 From: can1357 Date: Thu, 4 Jun 2026 16:35:15 +0200 Subject: [PATCH] feat(coding-agent/prompts): routed parallel requests to task subagents - Added system-prompt rule mapping user `parallel`/`parallelize` requests to `task` subagent fan-out. - Clarified that parallel tool calls alone do not satisfy the request. --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/prompts/system/system-prompt.md | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 00b5cda85..52a5b1bc6 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -7,6 +7,7 @@ ### Changed +- Changed the system prompt to treat user requests for parallel work as `task` subagent fan-out rather than parallel tool calls. - Changed the Agent Control Center's new-agent description field to use the multiline TUI editor, with Enter inserting lines and Ctrl+Enter generating the spec. - Refreshed the Ctrl+R history search overlay: the selected row now renders as a full-width `selectedBg` highlight bar, matched query tokens are highlighted in the accent color, each result shows a right-aligned relative timestamp, and the panel gained an icon'd accent title plus a two-tone keyhint footer. The selector also gained PageUp/PageDown (via the configurable `tui.select.pageUp`/`pageDown` keybindings) and Home/End navigation. - Changed Perplexity API-key web search to return more comprehensive results: `web_search_options.search_context_size` is now `high` (was `medium`) for maximum retrieval grounding, the default `num_search_results` is `20` (was `10`) so twice as many sources are surfaced, and `return_related_questions` is enabled with the response's `related_questions` now parsed into `relatedQuestions` (previously dropped). On an identical query this lifted the result from 10 sources / ~410 output tokens to 20 sources / ~1900 output tokens with a structured, multi-section answer; latency tracks model output length, not context size, so the 60s hard timeout headroom is unchanged. diff --git a/packages/coding-agent/src/prompts/system/system-prompt.md b/packages/coding-agent/src/prompts/system/system-prompt.md index 3f83b7336..9332ba277 100644 --- a/packages/coding-agent/src/prompts/system/system-prompt.md +++ b/packages/coding-agent/src/prompts/system/system-prompt.md @@ -114,6 +114,7 @@ Use tools whenever materially improve correctness, completeness, or grounding. - NEVER stop at first plausible answer if subsequent call would reduce uncertainty. - If lookup empty, partial, or suspiciously narrow, retry with different strategy. - SHOULD parallelize calls when possible. +{{#has tools "task"}}- User says `parallel`/`parallelize` → MUST use `{{toolRefs.task}}` subagents; parallel tool calls alone do not satisfy.{{/has}} {{#if toolInfo.length}} ## Inventory