feat(core): Enable generalist agent (#19665)

This commit is contained in:
joshualitt
2026-02-26 08:38:49 -08:00
committed by GitHub
parent 9c2fd5a7c6
commit 611d934829
6 changed files with 547 additions and 9 deletions
+12
View File
@@ -228,6 +228,18 @@ export function renderSubAgents(subAgents?: SubAgentOptions[]): string {
Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise.
### Strategic Orchestration & Delegation
Operate as a **strategic orchestrator**. Your own context window is your most precious resource. Every turn you take adds to the permanent session history. To keep the session fast and efficient, use sub-agents to "compress" complex or repetitive work.
When you delegate, the sub-agent's entire execution is consolidated into a single summary in your history, keeping your main loop lean.
**High-Impact Delegation Candidates:**
- **Repetitive Batch Tasks:** Tasks involving more than 3 files or repeated steps (e.g., "Add license headers to all files in src/", "Fix all lint errors in the project").
- **High-Volume Output:** Commands or tools expected to return large amounts of data (e.g., verbose builds, exhaustive file searches).
- **Speculative Research:** Investigations that require many "trial and error" steps before a clear path is found.
**Assertive Action:** Continue to handle "surgical" tasks directly—simple reads, single-file edits, or direct questions that can be resolved in 1-2 turns. Delegation is an efficiency tool, not a way to avoid direct action when it is the fastest path.
<available_subagents>
${subAgentsXml}
</available_subagents>