Copilot Chat renders internal <vscode_codeblock_uri isEdit subAgentInvocationId=...> tags for subagent edit blocks
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
## Summary
Copilot Chat rendered internal edit/file URI markers directly in the Chat view instead of converting them into the expected file/edit UI blocks.
The visible output contained raw tags like:
```html
file:///c%3A/Users/fenzho/code/github/java-migration-copilot-samples/asset-manager/README.md
```
This appeared alongside several empty gray placeholder blocks in the Chat response.
## What I Saw
During a Copilot Chat agent workflow using subagents, the Chat UI displayed raw internal tags for files that had been read or edited by a subagent:
```html
file:///c%3A/Users/fenzho/code/github/java-migration-copilot-samples/asset-manager/README.md
file:///c%3A/Users/fenzho/code/github/java-migration-copilot-samples/asset-manager/web/src/main/java/com/microsoft/migration/assets/config/RabbitConfig.java
file:///c%3A/Users/fenzho/code/github/java-migration-copilot-samples/asset-manager/worker/src/main/java/com/microsoft/migration/assets/worker/config/RabbitConfig.java
```
Screenshot is available if needed.
## Expected Behavior
The Chat view should render these as normal file/edit UI elements, file pills, or clickable file references.
The internal `` wrapper should not be visible to the user.
## Actual Behavior
The raw internal tags were shown directly in the Chat response, mixed with empty gray placeholder blocks.
This made the Chat output look malformed and hard to read.
## Relevant Details
- The issue occurred during a multi-agent Copilot Chat workflow.
- The visible `subAgentInvocationId` was `call_hOXkInry8cfbhIn0VAQOyQXS`.
- The files shown in the raw tags were files that the subagent read or edited during the workflow.
- The subagent's final returned text was normal Markdown and did not contain the raw `` tags.
- The raw tags appear to come from Chat UI rendering of subagent edit/file blocks, not from the model's final response text.
## Debug Evidence
The session logs show:
1. The parent coordinator invoked a subagent with id `call_hOXkInry8cfbhIn0VAQOyQXS`.
2. The subagent performed file operations involving `README.md`, `web/src/main/java/com/microsoft/migration/assets/config/RabbitConfig.java`, and `worker/src/main/java/com/microsoft/migration/assets/worker/config/RabbitConfig.java`.
3. The subagent's final result returned to the parent was normal Markdown summary text.
4. Before investigating this issue, the transcript did not contain `vscode_codeblock_uri` as ordinary assistant text. This suggests the raw tags were exposed by the Chat rendering layer rather than generated by the agent as user-facing text.
5. There was also a later parent execution-coordinator cancellation (`Agent error: Canceled`), but the raw tag display appears tied to rendering of subagent edit/file UI blocks rather than the final subagent response.
## Environment
- OS: Windows x64
- VS Code: 1.133.0 (`a5b500951314efd502d07465bd138dfbd714a960`)
- VS Code Chat session id: `ab17eca0-d8a9-432a-ad83-9fb63d53d9c5`
- Workflow involved Copilot Chat subagents and file edit/read tool calls.
I can provide the relevant Copilot Chat debug logs if needed.
Contributor guide
Assessment
This issue has not been assessed yet.