Skip to content

Exempt Search Subagent tool result from write to disk#4219

Merged
connor4312 merged 20 commits intomicrosoft:mainfrom
24anisha:anisha/searchsubagent_notdisk
Mar 5, 2026
Merged

Exempt Search Subagent tool result from write to disk#4219
connor4312 merged 20 commits intomicrosoft:mainfrom
24anisha:anisha/searchsubagent_notdisk

Conversation

@24anisha
Copy link
Contributor

@24anisha 24anisha commented Mar 4, 2026

Include full results found by the search subagent in the main agent model trajectory. Do not write the results to disk, just because it is large.

Reason: we see that the model only reads the first ~200 lines of the file and never really goes back to read more, which functionally makes all the work done by the search subagent redundant and useless.

Copilot AI review requested due to automatic review settings March 4, 2026 23:48
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 updates the panel prompt tool-result rendering so that results from the search_subagent tool are kept inline in the agent’s prompt/trajectory instead of being offloaded to disk when large, addressing cases where the model only reads the beginning of the written file.

Changes:

  • Plumbs the producing tool name into ToolResult as an optional prop.
  • Skips the “large tool result written to disk” pathway for ToolName.SearchSubagent results.
  • Updates the ToolResultElement call sites in this file to pass toolName.

@connor4312 connor4312 enabled auto-merge March 4, 2026 23:57
@vs-code-engineering vs-code-engineering bot added this to the 1.111.0 milestone Mar 4, 2026
@connor4312 connor4312 added this pull request to the merge queue Mar 5, 2026
Merged via the queue into microsoft:main with commit e26dd72 Mar 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants