Repository navigation
Investigation only: VS Code's Agent Host drops GitHub issues attached from the "+" menu (no changes in this repo) - #9146
Draft
Alex Ross (alexr00) with Copilot wants to merge 1 commit into
Draft
Alex Ross (alexr00) with Copilot wants to merge 1 commit into
Alex Ross (alexr00) with Copilot wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot
AI
changed the title
[WIP] Fix issues attached as context being invisible to Copilot
Investigation only: VS Code's Agent Host drops GitHub issues attached from the "+" menu (no changes in this repo)
Nov 2, 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.
A GitHub issue attached from + → GitHub Issues... shows up as a chip in chat, but the model never gets its content. The model only sees other context, such as the open file (
view.jsin the report). The reporter says it works when the issue is open in its own editor tab.This PR has no code changes. The extension produces the issue content correctly; VS Code drops it before the request reaches the model, so the fix has to go into microsoft/vscode.
Root cause
IssueContextProvider.resolveAttachChatContextfillsvaluewith JSON containing the title, body and comments. The chip only appears after this succeeds.ChatContextService._asPicker → asAttachment(chatContextService.ts, release/1.143 lines 243–250) does this for every chat context provider. The extension can't choose a different kind.agentHostSessionHandler._convertVariableToAttachment(release/1.143 lines 7426–7432;mainlines 8064–8070) only passes a generic attachment on if it carries_meta['copilot.attachmentDetail']. Anything else returnsundefined.kind: 'string'(chatImplicitContext.tslines 550–556). The Agent Host passes those on (line 7423).ChatPromptReference.toand is shown to the model as an<attachment>. This rules out a bug in the extension.Suggested fix (microsoft/vscode)
Pass generic attachments with a text value through as simple attachments:
Agent Host skill and command completions are also generic attachments, but their
valueis an object ({ $mid: 'agentHostCompletion', ... }), so this check leaves them alone. Another option is to haveasAttachmentcreatekind: 'string'attachments. That requires fillinguriandhandle, so it's a bigger change.Workaround
Open the issue in its editor tab before sending the request.