Skip to content

Remove chat.generalPurposeAgent.enabled and related code - #325259

Merged
Martin Aeschlimann (aeschli) merged 3 commits into
mainfrom
agents/remove-generalpurposeagent-enabled
Jul 12, 2026
Merged

Remove chat.generalPurposeAgent.enabled and related code#325259
Martin Aeschlimann (aeschli) merged 3 commits into
mainfrom
agents/remove-generalpurposeagent-enabled

Conversation

@aeschli

Copy link
Copy Markdown
Contributor

This pull request removes the chat.generalPurposeAgent.enabled setting and all associated code that relied on it being true, as the default value is false. Key changes include:

  • Removed setting registration from chat.shared.contribution.ts.
  • Eliminated references to the configuration in constants.ts and promptsService.ts.
  • Simplified subagent listing and selection logic in runSubagentTool.ts, computeAutomaticInstructions.ts, and automaticInstructionsCollector.ts.
  • Updated tests in runSubagentTool.test.ts, computeAutomaticInstructions.test.ts, and automaticInstructionsCollector.spec.ts to reflect these changes.

Additionally, a regression was fixed where unnamed subagents were not inheriting the current agent correctly. All validation checks have passed successfully.

Copilot AI review requested due to automatic review settings July 10, 2026 09:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request removes the chat.generalPurposeAgent.enabled configuration and all associated “General Purpose” subagent behavior, simplifying both core and extension-side automatic-instructions generation and aligning tests with the new behavior. It also adjusts runSubagent so that omitting agentName inherits the current agent’s mode instructions.

Changes:

  • Removed the chat.generalPurposeAgent.enabled setting registration and the corresponding ChatConfiguration enum entry (plus the GeneralPurposeAgentName constant).
  • Simplified subagent listing/selection logic in core (ComputeAutomaticInstructions, RunSubagentTool) and Copilot extension (AutomaticInstructionsCollector) to no longer special-case a built-in General Purpose agent.
  • Updated/removed tests that asserted General Purpose agent behavior; added a regression test ensuring omitted agentName inherits current mode instructions.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/common/tools/builtinTools/runSubagentTool.test.ts Removes GP-specific tests and adds coverage for inheriting current mode instructions when agentName is omitted.
src/vs/workbench/contrib/chat/test/common/promptSyntax/computeAutomaticInstructions.test.ts Removes GP agent ordering test from automatic-instructions generation.
src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts Removes GP gating and adds “inherit current agent” behavior when agentName is omitted.
src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.ts Removes GP agent injection into <agents> list and updates tool guidance text.
src/vs/workbench/contrib/chat/common/constants.ts Deletes the configuration key and the GeneralPurposeAgentName constant.
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts Removes configuration registration for chat.generalPurposeAgent.enabled.
extensions/copilot/src/platform/promptFiles/test/node/automaticInstructionsCollector.spec.ts Removes GP agent ordering test in extension-side instruction collection.
extensions/copilot/src/platform/promptFiles/node/automaticInstructionsCollector.ts Removes GP agent injection into <agents> list and updates tool guidance text.
extensions/copilot/src/platform/promptFiles/common/promptsService.ts Removes the extension-side config constant for chat.generalPurposeAgent.enabled.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 4
  • Review effort level: Low

Comment thread src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts Outdated
Comment thread src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts Outdated
roblourens
roblourens previously approved these changes Jul 10, 2026
@lszomoru

Copy link
Copy Markdown
Member

@microsoft-github-policy-service rerun

auto-merge was automatically disabled July 12, 2026 18:47

Pull request was closed

@aeschli
Martin Aeschlimann (aeschli) merged commit cf2d8b9 into main Jul 12, 2026
29 checks passed
@aeschli
Martin Aeschlimann (aeschli) deleted the agents/remove-generalpurposeagent-enabled branch July 12, 2026 19:56
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants