Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds support for a built-in "General Purpose" agent to the runSubagent tool. The General Purpose agent allows the tool to invoke a subagent that inherits the parent agent's model, tools, and system prompt, providing a full-capability option when custom agents don't fit the task.
Changes:
- Made
agentNamea required parameter in the runSubagent tool schema, with defensive handling for models that omit it - Introduced the
GeneralPurposeAgentNameconstant as the canonical name for the built-in general-purpose agent - Modified automatic instructions to always include the General Purpose agent first in the agents list, followed by custom agents (when enabled)
- Updated tests to verify General Purpose agent behavior including undefined/empty string handling
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts | Added GeneralPurposeAgentName constant; made agentName required in schema; updated invoke and prepareToolInvocation to handle General Purpose agent as default; simplified onDidUpdateToolData to Event.None |
| src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.ts | Modified to always include General Purpose agent first in agents list, with custom agents conditionally added when config enabled |
| src/vs/workbench/contrib/chat/test/common/tools/builtinTools/runSubagentTool.test.ts | Added createTool helper; added tests for undefined/empty agentName handling as General Purpose; updated existing tests to expect agentName in schema and General Purpose agent name in results |
| src/vs/workbench/contrib/chat/test/common/promptSyntax/computeAutomaticInstructions.test.ts | Updated test expectations to account for General Purpose agent being first; added test for disabled custom agents showing only General Purpose agent |
src/vs/workbench/contrib/chat/test/common/tools/builtinTools/runSubagentTool.test.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts
Show resolved
Hide resolved
dmitrivMS
approved these changes
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exposes a built-in "General Purpose" subagent so the model always has a named agent for parallel execution, without requiring the
SubagentToolCustomAgentsconfig flag.Refs microsoft/vscode-internalbacklog#6750
Changes
runSubagentTool.tsagentNameis now required in the tool schema (always present, not gated by config)GeneralPurposeAgentName) — when selected, inherits the parent's system prompt, model, and tools (same as the previous unnamed-agent behavior)invoke()/prepareToolInvocation()useisGeneralPurposecheck to branch between built-in and custom agent pathsBaseModelDescriptionalways includes the agent-name instructioncomputeAutomaticInstructions.ts<agents>XML block now renders wheneverrunSubagentToolis available (outer config gate removed)SubagentToolCustomAgentsconfigrunSubagentTool.test.tsagentNamealways in schema, required array includes itTesting