Add subagent name to chat request for logging#289007
Merged
roblourens merged 2 commits intomainfrom Jan 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds a subAgentName field to track the display name of subagents throughout the chat request pipeline for logging purposes. The field is propagated from the tool invocation through the chat request flow to the extension API.
Changes:
- Added
subAgentNameoptional property to chat request and tool invocation interfaces - Threaded the field through extension host protocol and type converters
- Populated the field from
args.agentNamein the RunSubagentTool implementation
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts | Added subAgentName property to ChatRequest interface and LanguageModelToolInvocationOptions |
| src/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts | Added subAgentName to ChatToolInvocationPart class and beginToolInvocation method signature |
| src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.ts | Added subAgentName to IToolInvocation and IBeginToolCallOptions interfaces |
| src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts | Populated subAgentName from args.agentName when creating agent request |
| src/vs/workbench/contrib/chat/common/participants/chatAgents.ts | Added subAgentName property to IChatAgentRequest interface |
| src/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatToolInvocation.ts | Added subAgentName to IStreamingToolCallOptions and ChatToolInvocation class |
| src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.ts | Threaded subAgentName through ChatToolInvocation creation and beginToolCall method |
| src/vs/workbench/api/common/extHostTypes.ts | Added subAgentName property to ChatToolInvocationPart class |
| src/vs/workbench/api/common/extHostTypeConverters.ts | Added conversion logic for subAgentName in ChatToolInvocationPart and ChatAgentRequest converters |
| src/vs/workbench/api/common/extHostLanguageModelTools.ts | Propagated subAgentName through tool invocation options |
| src/vs/workbench/api/common/extHostChatAgents2.ts | Added subAgentName to beginToolInvocation DTO creation |
| src/vs/workbench/api/common/extHost.protocol.ts | Added subAgentName property to IChatBeginToolInvocationDto interface |
| src/vs/workbench/api/browser/mainThreadChatAgents2.ts | Threaded subAgentName through to languageModelToolsService.beginToolCall |
DonJayamanne
approved these changes
Jan 20, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.