Skip to content

Conversation

@przpl
Copy link

@przpl przpl commented Dec 16, 2025

Fixes #282310

Example of a [tool/runSubagent] request with instructions attached to the system prompt:

image

Copilot AI review requested due to automatic review settings December 16, 2025 08:05
@przpl
Copy link
Author

przpl commented Dec 16, 2025

@microsoft-github-policy-service agree

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for collecting computed attachments (automatic instructions) in the runSubagent tool. Previously, the subagent was invoked with an empty variables array, which meant it didn't benefit from automatic instruction collection based on enabled tools and context. The fix ensures that automatic instructions are collected based on the enabled tools configuration before invoking the subagent, consistent with the pattern used in the main chat widget.

Key Changes:

  • Added collectVariables private method that converts enabled tool IDs to full reference names and uses ComputeAutomaticInstructions to collect automatic instructions
  • Modified the invoke method to collect variables before creating the agent request
  • Added necessary service dependencies and imports

@vs-code-engineering vs-code-engineering bot added this to the December / January 2026 milestone Dec 16, 2025
@aeschli aeschli enabled auto-merge (squash) December 16, 2025 20:39
@aeschli
Copy link
Contributor

aeschli commented Dec 16, 2025

@przpl Nice, thanks!

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.

Subagent doesn't get instructions with the system prompt

2 participants