Repository navigation
Description
Bug Report
VS Code Version: 1.109.2 (591199d, x64)
OS: Ubuntu Linux x64
Copilot Chat Extension: Agent mode
Selected Model: Claude Opus 4.6
MCP Servers: mssql-mcp (stdio), postgres-mcp (stdio), memory MCP (stdio)
Description
The error Failed to render content: ModelService: Cannot add model because it already exists! still occurs in VS Code 1.109.2 when the agent makes parallel calls to the same MCP tool.
This was supposedly fixed in #275675 (PR #275870 — using tool call ID instead of tool ID), but the bug persists. Issue #283154 also reported this but was closed for lack of repro info.
Steps to Reproduce
- Configure multiple MCP servers (e.g., mssql-mcp, postgres-mcp) via stdio
- In Agent mode, give a prompt that requires parallel calls to the same MCP tool
- Example prompt: "Compare journal entries schema between MSSQL and PostgreSQL"
- The agent attempts to call
mcp_mssql-mcp_execute_sqlmultiple times in parallel (e.g., to fetch schema of two different tables simultaneously) - First call succeeds, but subsequent parallel calls to the same tool fail with:
Failed to render content: ModelService: Cannot add model because it already exists!
Expected Behavior
All parallel MCP tool calls should succeed, since each call has a unique call ID.
Actual Behavior
Only the first parallel call to a given MCP tool succeeds. Additional parallel calls to the same MCP tool name fail with the ModelService error. The chat session becomes partially broken and may need to be restarted.
Additional Context
- This happens consistently when the agent batches multiple
execute_sqlcalls - It does NOT happen when calls are made sequentially (one at a time)
- Cancelling pending tool dialogs sometimes allows recovery
- Starting a new chat session always resolves it temporarily
- The pattern matches exactly what was described in
ModelService: Cannot add model because it already exists!error in chat window when agent attempts parallel tool executions #275675 and Failed to render content: ModelService: Cannot add model because it already exists! #283154
Related Issues
ModelService: Cannot add model because it already exists!error in chat window when agent attempts parallel tool executions #275675 (Fixed Nov 2025 — but regression/incomplete fix)- Failed to render content: ModelService: Cannot add model because it already exists! #283154 (Closed Dec 2025 — same issue, closed for lack of info)
Activity
connor4312 commentedon Feb 17, 2026
Also easy to repro with steering messages that cause list re-rendering
cwebster-99 commentedon Feb 18, 2026
I ran into this today with the fabric-rti-mcp
jjkavalam commentedon Feb 26, 2026
I too ran into this today. (If others are seeing same error you can put a 👍 on this comment)
chat: Use ref-counted model collection for tool confirmation inputs
chat: Use ref-counted model collection for tool confirmation inputs (#…
xlacia commentedon Mar 3, 2026
Too. The most awful thing is, what i only can do is stop the session and waste my token.
RipTheNet commentedon Mar 4, 2026
Just stumble upon the same issue when using VSCode for MAC. I'm running the latest version (as of today) of VSCode, hope this is resolved soon.
Update main-os to latest upstream with OS customizations (#50)