Skip to content

[GitHub Copilot - Bug | Feature request]: @mssql Copilot participant loses connection context after saving untitled SQL editor to disk #21147

@TLuquet-MAG

Description

@TLuquet-MAG

Description

The @mssql GitHub Copilot participant correctly recognizes active connections in untitled editors (initiated via Chat), but immediately loses context when that editor is saved to disk (changing the URI scheme from untitled: to file:).

Even though the MSSQL extension itself successfully migrates the connection to the new file path (verified in Output logs), the Copilot Chat participant fails to update its context. It treats the newly saved file as disconnected, blocking all subsequent @mssql commands.

Expected Behavior

The @mssql participant should recognize that the active editor (repro_test.sql) is still connected to the same session as the previous untitled editor and proceed with the command.

Actual Behavior

Copilot Chat responds with:

"No active database connection in the current editor. Please establish a connection to continue.
An active connection is required for GitHub Copilot to understand your database schema and proceed.
Select "Connect" to establish a connection."

The user is forced to disconnect and reconnect the file manually (or reload the window) to restore the link between the MSSQL extension and Copilot.

Screenshots

Image Image

Logs

MSSQL Output Log:

[10:17:54 AM] [MainController] [Verbose]: Workspace HTTP config didn't contain a proxy endpoint. Checking environment variables.
[10:17:54 AM] [MainController] [Verbose]: No proxy value found in either HTTPS_PROXY or HTTP_PROXY environment variables.
[10:17:54 AM] [SQL Tools Service] Initializing SQL tools service for the mssql extension.
[10:17:54 AM] [SQL Tools Service] Note: mssql commands will be available after installing the service.
[10:17:54 AM] [SQL Tools Service]
[10:17:54 AM] [SQL Tools Service] Platform: win32, x86_64 (Windows)
[10:17:54 AM] [SQL Tools Service]
[10:17:55 AM] [ConnectionManager] [Verbose]: Beginning migration of legacy connections
[10:17:55 AM] [ConnectionStore] [Verbose]: readAllConnections(): 2 connections found; excluded recent
[10:17:55 AM] [ConnectionManager] [Verbose]: No legacy Connection String connections found to migrate. (2 not needed, 0 errored)
[10:17:55 AM] [ConnectionStore] [Verbose]: readAllConnections(): 2 connections found; excluded recent
[10:17:55 AM] [CredentialStore] [Information]: Retrieved credential for id azureAccountProviderCredentials|accessTokenCache-iv from VS Code Secret Storage.
[10:17:55 AM] [CredentialStore] [Information]: Retrieved credential for id azureAccountProviderCredentials|accessTokenCache-key from VS Code Secret Storage.
[10:17:55 AM] [MssqlCopilot] [Verbose]: In handler
[10:17:55 AM] [MssqlCopilot] [Verbose]: Starting new chat conversation: conversion 'conversationUri1' with connection 'undefined'
[10:17:55 AM] [MssqlCopilot] [Verbose]: No active editor found.
[10:17:55 AM] [MssqlCopilot] [Information]: Process references using the appropriate editor...
[10:17:55 AM] [MssqlCopilot] [Verbose]: in findEditorFromReferences
[10:17:55 AM] [MssqlCopilot] [Information]: Checking references...
[10:17:55 AM] [MssqlCopilot] [Verbose]: No reference URI found.
[10:17:55 AM] [MssqlCopilot] [Information]: No matching editor found in references. Checking tab groups...
[10:17:55 AM] [MssqlCopilot] [Verbose]: in isSqlDocument
[10:17:55 AM] [MssqlCopilot] [Verbose]: Checking if document is SQL: json
[10:17:55 AM] [MssqlCopilot] [Verbose]: Is SQL document: No
[10:17:55 AM] [MssqlCopilot] [Verbose]: Exiting isSqlDocument
[10:17:55 AM] [MssqlCopilot] [Verbose]: Exiting findEditorFromReferences
[10:17:55 AM] [MssqlCopilot] [Verbose]: No matching editor found in tab groups. Returning undefined.
[10:17:55 AM] [MssqlCopilot] [Information]: No editor found.
[10:17:55 AM] [MssqlCopilot] [Information]: No connection URI found.
[10:17:55 AM] [MssqlCopilot] [Information]: reference value is a string)
[10:17:55 AM] [MssqlCopilot] [Information]: Debug logging disabled.
[10:17:55 AM] [MssqlCopilot] [Information]: No connection URI/connection was found. Sending prompt to default language model.
[10:17:55 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:17:55 AM] [ConnectionStore] [Verbose]: readAllConnections(): 2 connections found; excluded recent
[10:17:57 AM] Connecting to server "magsqlserver" on document "untitled:Untitled-1".
[10:17:57 AM] Connected to server "magsqlserver" on document "untitled:Untitled-1". Server information: {redacted}
[10:17:58 AM] [ObjectExplorerService] [Verbose]: Session created successfully with session ID magsqlserver__NULL_Integrated_0F05B9F4-4F6F-4B6C-A30E-9EE884CFFB7C_applicationIntent:ReadWrite_applicationName:vscode-mssql_encrypt:Mandatory_id:0F05B9F4-4F6F-4B6C-A30E-9EE884CFFB7C_trustServerCertificate:true
[10:17:58 AM] Connecting to server "magsqlserver" on document "magsqlserver__NULL_Integrated_0F05B9F4-4F6F-4B6C-A30E-9EE884CFFB7C_applicationIntent:ReadWrite_applicationName:vscode-mssql_encrypt:Mandatory_id:0F05B9F4-4F6F-4B6C-A30E-9EE884CFFB7C_trustServerCertificate:true".
[10:17:58 AM] Connected to server "magsqlserver" on document "magsqlserver__NULL_Integrated_0F05B9F4-4F6F-4B6C-A30E-9EE884CFFB7C_applicationIntent:ReadWrite_applicationName:vscode-mssql_encrypt:Mandatory_id:0F05B9F4-4F6F-4B6C-A30E-9EE884CFFB7C_trustServerCertificate:true". Server information: {redacted}
[10:18:00 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:18:00 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:18:03 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:19:12 AM] [MssqlCopilot] [Verbose]: In handler
[10:19:12 AM] [MssqlCopilot] [Verbose]: Starting new chat conversation: conversion 'conversationUri2' with connection 'undefined'
[10:19:12 AM] [MssqlCopilot] [Verbose]: No active editor found.
[10:19:12 AM] [MssqlCopilot] [Information]: Process references using the appropriate editor...
[10:19:12 AM] [MssqlCopilot] [Verbose]: in findEditorFromReferences
[10:19:12 AM] [MssqlCopilot] [Information]: Checking references...
[10:19:12 AM] [MssqlCopilot] [Verbose]: Found a reference URI.
[10:19:12 AM] [MssqlCopilot] [Information]: Looking for matching visible editor...
[10:19:12 AM] [MssqlCopilot] [Verbose]: in isSqlDocument
[10:19:12 AM] [MssqlCopilot] [Verbose]: Checking if document is SQL: sql
[10:19:12 AM] [MssqlCopilot] [Verbose]: Is SQL document: Yes
[10:19:12 AM] [MssqlCopilot] [Verbose]: Exiting isSqlDocument
[10:19:12 AM] [MssqlCopilot] [Information]: Returning matching visible editor.
[10:19:12 AM] [MssqlCopilot] [Information]: Using editor found.
[10:19:12 AM] [MssqlCopilot] [Information]: Using the preferred editor's connection URI.
[10:19:12 AM] [MssqlCopilot] [Information]: Value is a URI
[10:19:12 AM] [MssqlCopilot] [Information]: Opening text document
[10:19:12 AM] [MssqlCopilot] [Information]: reference value is a string)
[10:19:12 AM] [MssqlCopilot] [Information]: Debug logging disabled.
[10:19:12 AM] [MssqlCopilot] [Information]: Conversation started.
[10:19:12 AM] [MssqlCopilot] [Verbose]: Continue polling messages for 'conversationUri2'
[10:19:12 AM] [MssqlCopilot] [Information]: Processing tool calls and awaiting for the result...
[10:19:12 AM] [MssqlCopilot] [Verbose]: in processToolCalls
[10:19:12 AM] [MssqlCopilot] [Verbose]: Getting next message for conversationUri: conversationUri2
[10:19:12 AM] [MssqlCopilot] [Verbose]: Finished processing tool calls for conversationUri: conversationUri2
[10:19:12 AM] [MssqlCopilot] [Information]: Processing LLM message...
[10:19:12 AM] [MssqlCopilot] [Verbose]: in handleRequestLLMMessage
[10:19:12 AM] [MssqlCopilot] [Verbose]: in mapRequestTools...
[10:19:12 AM] [MssqlCopilot] [Verbose]: in prepareRequestMessages
[10:19:12 AM] [MssqlCopilot] [Information]: Getting initial system messages
[10:19:12 AM] [MssqlCopilot] [Information]: Getting history messages
[10:19:12 AM] [MssqlCopilot] [Information]: Getting reference messages
[10:19:12 AM] [MssqlCopilot] [Information]: Getting remaining messages...
[10:19:12 AM] [MssqlCopilot] [Information]: Returning combined messages...
[10:19:12 AM] [MssqlCopilot] [Verbose]: in processResponseParts...
[10:19:16 AM] [MssqlCopilot] [Information]: Part is a language model text part.
[10:19:16 AM] [MssqlCopilot] [Information]: Finished processing response parts.
[10:19:16 AM] [MssqlCopilot] [Information]: Finished handling request LLM message.
[10:19:16 AM] [MssqlCopilot] [Verbose]: Done processing message for '2fd924f4-862a-4304-a85b-a5c87b19a4d3'
[10:19:16 AM] [MssqlCopilot] [Verbose]: Continue polling messages for '2fd924f4-862a-4304-a85b-a5c87b19a4d3'
[10:19:16 AM] [MssqlCopilot] [Information]: Processing tool calls and awaiting for the result...
[10:19:16 AM] [MssqlCopilot] [Verbose]: in processToolCalls
[10:19:16 AM] [MssqlCopilot] [Verbose]: Getting next message for conversationUri: 2fd924f4-862a-4304-a85b-a5c87b19a4d3
[10:19:16 AM] [MssqlCopilot] [Verbose]: Finished processing tool calls for conversationUri: 2fd924f4-862a-4304-a85b-a5c87b19a4d3
[10:19:16 AM] [MssqlCopilot] [Information]: Processing LLM message...
[10:19:16 AM] [MssqlCopilot] [Verbose]: in handleRequestLLMMessage
[10:19:16 AM] [MssqlCopilot] [Verbose]: in mapRequestTools...
[10:19:16 AM] [MssqlCopilot] [Information]: result.messageType is RequestLLM
[10:19:16 AM] [MssqlCopilot] [Verbose]: in prepareRequestMessages
[10:19:16 AM] [MssqlCopilot] [Information]: Getting initial system messages
[10:19:16 AM] [MssqlCopilot] [Information]: Getting history messages
[10:19:16 AM] [MssqlCopilot] [Information]: Getting reference messages
[10:19:16 AM] [MssqlCopilot] [Information]: Getting remaining messages...
[10:19:16 AM] [MssqlCopilot] [Information]: Returning combined messages...
[10:19:16 AM] [MssqlCopilot] [Verbose]: in processResponseParts...
[10:19:23 AM] [MssqlCopilot] [Information]: Part is a language model tool call part.
[10:19:23 AM] [MssqlCopilot] [Verbose]: in processToolCall
[10:19:23 AM] [MssqlCopilot] [Information]: Looking up tool
[10:19:23 AM] [MssqlCopilot] [Verbose]: Calling tool: GenerativeQuery-ReadFromDatabase with {"generatedQuery":"SELECT 'I am running this query with the newly opened SQL editor (not locally saved) as context'","queryDescription":"Select a specific string literal for display."}
[10:19:23 AM] [MssqlCopilot] [Information]: Finished processing tool call.
[10:19:23 AM] [MssqlCopilot] [Verbose]: Pushing GenerativeQuery-ReadFromDatabase to toolsCalled
[10:19:23 AM] [MssqlCopilot] [Information]: Finished processing response parts.
[10:19:23 AM] [MssqlCopilot] [Information]: Finished handling request LLM message.
[10:19:23 AM] [MssqlCopilot] [Verbose]: Done processing message for 'conversationUri2'
[10:19:23 AM] [MssqlCopilot] [Verbose]: Continue polling messages for 'conversationUri2'
[10:19:23 AM] [MssqlCopilot] [Information]: Processing tool calls and awaiting for the result...
[10:19:23 AM] [MssqlCopilot] [Verbose]: in processToolCalls
[10:19:23 AM] [MssqlCopilot] [Verbose]: Getting next message for conversationUri: conversationUri2
[10:19:23 AM] [MssqlCopilot] [Verbose]: Finished processing tool calls for conversationUri: conversationUri2
[10:19:23 AM] [MssqlCopilot] [Information]: Processing LLM message...
[10:19:23 AM] [MssqlCopilot] [Verbose]: in handleRequestLLMMessage
[10:19:23 AM] [MssqlCopilot] [Verbose]: in mapRequestTools...
[10:19:23 AM] [MssqlCopilot] [Verbose]: in prepareRequestMessages
[10:19:23 AM] [MssqlCopilot] [Information]: Getting initial system messages
[10:19:23 AM] [MssqlCopilot] [Information]: Getting history messages
[10:19:23 AM] [MssqlCopilot] [Information]: Getting reference messages
[10:19:23 AM] [MssqlCopilot] [Information]: Getting remaining messages...
[10:19:23 AM] [MssqlCopilot] [Information]: Returning combined messages...
[10:19:23 AM] [MssqlCopilot] [Verbose]: in processResponseParts...
[10:19:28 AM] [MssqlCopilot] [Information]: Part is a language model text part.
[10:19:28 AM] [MssqlCopilot] [Information]: Finished processing response parts.
[10:19:28 AM] [MssqlCopilot] [Information]: Finished handling request LLM message.
[10:19:28 AM] [MssqlCopilot] [Verbose]: Done processing message for 'f6d9320f-b617-4664-baa3-5a6e09de12d4'
[10:19:28 AM] [MssqlCopilot] [Verbose]: Continue polling messages for 'f6d9320f-b617-4664-baa3-5a6e09de12d4'
[10:19:28 AM] [MssqlCopilot] [Information]: Processing tool calls and awaiting for the result...
[10:19:28 AM] [MssqlCopilot] [Verbose]: in processToolCalls
[10:19:28 AM] [MssqlCopilot] [Verbose]: Getting next message for conversationUri: f6d9320f-b617-4664-baa3-5a6e09de12d4
[10:19:28 AM] [MssqlCopilot] [Verbose]: Finished processing tool calls for conversationUri: f6d9320f-b617-4664-baa3-5a6e09de12d4
[10:19:28 AM] [MssqlCopilot] [Information]: Processing LLM message...
[10:19:28 AM] [MssqlCopilot] [Verbose]: in handleRequestLLMMessage
[10:19:28 AM] [MssqlCopilot] [Verbose]: in mapRequestTools...
[10:19:28 AM] [MssqlCopilot] [Information]: result.messageType is RequestLLM
[10:19:28 AM] [MssqlCopilot] [Verbose]: in prepareRequestMessages
[10:19:28 AM] [MssqlCopilot] [Information]: Getting initial system messages
[10:19:28 AM] [MssqlCopilot] [Information]: Getting history messages
[10:19:28 AM] [MssqlCopilot] [Information]: Getting reference messages
[10:19:28 AM] [MssqlCopilot] [Information]: Getting remaining messages...
[10:19:28 AM] [MssqlCopilot] [Information]: Returning combined messages...
[10:19:28 AM] [MssqlCopilot] [Verbose]: in processResponseParts...
[10:19:33 AM] [MssqlCopilot] [Information]: Part is a language model text part.
[10:19:33 AM] [MssqlCopilot] [Information]: Part is a language model text part.
[10:19:33 AM] [MssqlCopilot] [Information]: Finished processing response parts.
[10:19:33 AM] [MssqlCopilot] [Information]: Finished handling request LLM message.
[10:19:33 AM] [MssqlCopilot] [Verbose]: Done processing message for 'conversationUri2'
[10:19:33 AM] [MssqlCopilot] [Verbose]: Continue polling messages for 'conversationUri2'
[10:19:33 AM] [MssqlCopilot] [Information]: Processing tool calls and awaiting for the result...
[10:19:33 AM] [MssqlCopilot] [Verbose]: in processToolCalls
[10:19:33 AM] [MssqlCopilot] [Verbose]: Getting next message for conversationUri: conversationUri2
[10:19:33 AM] [MssqlCopilot] [Verbose]: Message type is complete for conversationUri: conversationUri2
[10:19:33 AM] [MssqlCopilot] [Verbose]: Finished processing tool calls for conversationUri: conversationUri2
[10:19:33 AM] [MssqlCopilot] [Information]: Processing complete message...
[10:19:33 AM] [MssqlCopilot] [Verbose]: Done processing message for 'conversationUri2'
[10:20:04 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:06 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:06 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:07 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:16 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:16 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:18 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:20 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:20 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:20:22 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:21:42 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:21:57 AM] Connecting to server "magsqlserver" on document "file:///c:/MDIDev/repro_test.sql".
[10:21:57 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:21:57 AM] Connecting to server "magsqlserver" on document "file:///c:/MDIDev/repro_test.sql".
[10:21:57 AM] Connected to server "magsqlserver" on document "file:///c:/MDIDev/repro_test.sql". Server information: {redacted}
[10:21:57 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:22:00 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:23:08 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:23:10 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:23:25 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:23:27 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:23:35 AM] [MssqlCopilot] [Verbose]: In handler
[10:23:35 AM] [MssqlCopilot] [Verbose]: Starting new chat conversation: conversion 'conversationUri3' with connection 'undefined'
[10:23:35 AM] [MssqlCopilot] [Verbose]: No active editor found.
[10:23:35 AM] [MssqlCopilot] [Information]: Process references using the appropriate editor...
[10:23:35 AM] [MssqlCopilot] [Verbose]: in findEditorFromReferences
[10:23:35 AM] [MssqlCopilot] [Information]: Checking references...
[10:23:35 AM] [MssqlCopilot] [Verbose]: Found a reference URI.
[10:23:35 AM] [MssqlCopilot] [Information]: Looking for matching visible editor...
[10:23:35 AM] [MssqlCopilot] [Verbose]: in isSqlDocument
[10:23:35 AM] [MssqlCopilot] [Verbose]: Checking if document is SQL: sql
[10:23:35 AM] [MssqlCopilot] [Verbose]: Is SQL document: Yes
[10:23:35 AM] [MssqlCopilot] [Verbose]: Exiting isSqlDocument
[10:23:35 AM] [MssqlCopilot] [Information]: Returning matching visible editor.
[10:23:35 AM] [MssqlCopilot] [Information]: Using editor found.
[10:23:35 AM] [MssqlCopilot] [Information]: Using the preferred editor's connection URI.
[10:23:35 AM] [MssqlCopilot] [Information]: Value is a URI
[10:23:35 AM] [MssqlCopilot] [Information]: Opening text document
[10:23:35 AM] [MssqlCopilot] [Information]: reference value is a string)
[10:23:35 AM] [MssqlCopilot] [Information]: Debug logging disabled.
[10:23:35 AM] [MssqlCopilot] [Information]: No connection URI/connection was found. Sending prompt to default language model.
[10:24:36 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:24:40 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:24:41 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:24:41 AM] [queryResult] [Warning]: Attempted to write message but webview is not set
[10:24:58 AM] [queryResult] [Warning]: Attempted to write message but webview is not set

GitHub Copilot Chat Output Log:

2026-02-10 10:16:15.198 [info] [GitExtensionServiceImpl] Initializing Git extension service.
2026-02-10 10:16:15.198 [error] Copilot extension not found
2026-02-10 10:16:15.198 [info] Creating node-pty shim: source=c:\Users\tluquet\scoop\apps\vscode\1.108.2\resources\app\node_modules\node-pty\build\Release, dest=c:\Users\tluquet\scoop\apps\vscode\1.108.2\data\extensions\github.copilot-chat-0.36.2\node_modules\@github\copilot\prebuilds\win32-x64
2026-02-10 10:16:15.199 [info] Creating ripgrep shim: source=c:\Users\tluquet\scoop\apps\vscode\1.108.2\resources\app\node_modules\@vscode\ripgrep\bin, dest=c:\Users\tluquet\scoop\apps\vscode\1.108.2\data\extensions\github.copilot-chat-0.36.2\node_modules\@github\copilot\sdk\ripgrep\bin\win32-x64
2026-02-10 10:16:15.199 [info] Found 1 entries to copy: rg.exe
2026-02-10 10:16:15.199 [info] Found 6 entries to copy: conpty, conpty.node, conpty_console_list.node, pty.node, winpty-agent.exe, winpty.dll
2026-02-10 10:16:15.242 [info] Logged in as TLuquet-MAG
2026-02-10 10:16:15.249 [info] Using the Electron fetcher.
2026-02-10 10:16:15.961 [info] Got Copilot token for TLuquet-MAG
2026-02-10 10:16:15.961 [info] Copilot Chat: 0.36.2, VS Code: 1.108.2
2026-02-10 10:16:15.973 [info] activationBlocker from 'languageModelAccess' took for 1521ms
2026-02-10 10:16:16.181 [info] [GitExtensionServiceImpl] Successfully activated the vscode.git extension.
2026-02-10 10:16:16.181 [info] [GitExtensionServiceImpl] Enablement state of the vscode.git extension: true.
2026-02-10 10:16:16.181 [info] [GitExtensionServiceImpl] Successfully registered Git commit message provider.
2026-02-10 10:16:16.196 [info] Fetched model metadata in 1732ms 49e4fbab-709c-4b97-9b19-93a862455fb2
2026-02-10 10:16:16.228 [info] Latest entry: ccreq:latest.copilotmd
2026-02-10 10:16:16.228 [info] ccreq:165d8816.copilotmd | markdown
2026-02-10 10:16:16.412 [info] copilot token chat_enabled: true, sku: copilot_for_business_seat_quota
2026-02-10 10:16:16.412 [info] GitHub.vscode-pull-request-github extension is not yet activated.
2026-02-10 10:16:16.427 [info] Registering default platform agent...
2026-02-10 10:16:16.428 [info] activationBlocker from 'conversationFeature' took for 1981ms
2026-02-10 10:16:16.483 [warning] Copilot preview features are disabled by organizational policy. Learn more: https://aka.ms/github-copilot-org-enable-features
2026-02-10 10:16:16.483 [info] GithubAvailableEmbeddingTypesManager: Got embeddings. Primary: metis-1024-I16-Binary. Deprecated:
2026-02-10 10:16:16.486 [info] WorkspaceChunkSearchService: using embedding type metis-1024-I16-Binary
2026-02-10 10:16:16.594 [info] Fetched model metadata in 182ms 12d901e7-780f-42a4-8a58-f97924118fe5
2026-02-10 10:16:16.678 [info] Logged in as TLuquet-MAG
2026-02-10 10:16:16.820 [info] ccreq:775b5f3a.copilotmd | markdown
2026-02-10 10:16:17.244 [info] Got Copilot token for TLuquet-MAG
2026-02-10 10:16:17.245 [info] Copilot Chat: 0.36.2, VS Code: 1.108.2
2026-02-10 10:16:17.262 [info] copilot token chat_enabled: true, sku: copilot_for_business_seat_quota
2026-02-10 10:16:17.264 [warning] Copilot preview features are disabled by organizational policy. Learn more: https://aka.ms/github-copilot-org-enable-features
2026-02-10 10:16:17.317 [info] Fetched model metadata in 57ms bac9d8ea-a3df-4c55-8f89-74d534b5e0ce
2026-02-10 10:16:17.345 [info] ccreq:ff9fcb90.copilotmd | markdown
2026-02-10 10:17:56.385 [info] message 0 returned. finish reason: [stop]
2026-02-10 10:17:56.385 [info] request done: requestId: [c3dc891a-0c17-4255-a8c1-1b4d39ab4825] model deployment ID: []
2026-02-10 10:17:56.387 [info] ccreq:deddb9fb.copilotmd | success | gpt-4o-mini-2024-07-18 | 725ms | [title]
2026-02-10 10:19:16.836 [info] message 0 returned. finish reason: [stop]
2026-02-10 10:19:16.836 [info] request done: requestId: [9dceec33-9c9a-4e73-8b3a-5bb39dbdab07] model deployment ID: []
2026-02-10 10:19:16.838 [info] ccreq:72a4dff9.copilotmd | success | gemini-3-pro-preview | 4200ms | [copilotLanguageModelWrapper]
2026-02-10 10:19:23.516 [info] message 0 returned. finish reason: [tool_calls]
2026-02-10 10:19:23.516 [info] request done: requestId: [bfcf22b7-6232-4eed-baf8-f8fd70fa9c8a] model deployment ID: []
2026-02-10 10:19:23.517 [info] ccreq:26f4cc6d.copilotmd | success | gemini-3-pro-preview | 6601ms | [copilotLanguageModelWrapper]
2026-02-10 10:19:28.302 [info] message 0 returned. finish reason: [stop]
2026-02-10 10:19:28.302 [info] request done: requestId: [bc4490bb-2420-41b5-8c79-f669fe9069b4] model deployment ID: []
2026-02-10 10:19:28.303 [info] ccreq:6fd18fd0.copilotmd | success | gemini-3-pro-preview | 4755ms | [copilotLanguageModelWrapper]
2026-02-10 10:19:33.044 [info] message 0 returned. finish reason: [stop]
2026-02-10 10:19:33.044 [info] request done: requestId: [094b3dc2-5683-4416-9cec-31376fc81477] model deployment ID: []
2026-02-10 10:19:33.046 [info] ccreq:3158f488.copilotmd | success | gemini-3-pro-preview | 4715ms | [copilotLanguageModelWrapper]

Steps to Reproduce

  1. Open VS Code with the MSSQL and GitHub Copilot extensions installed.
  2. Open the Copilot Chat pane.
  3. Run the command: @mssql /connect
  4. Select a valid connection profile.
    • Observation: A new untitled:Untitled-1 editor opens and connects. Copilot Chat works correctly here.
  5. In Copilot Chat, run: @mssql /runQuery SELECT 'I am running this query with the newly opened SQL editor (not locally saved) as context'
  6. Save the editor to a local file (e.g., Ctrl+S -> repro_test.sql).
  7. In Copilot Chat, run: @mssql /runQuery SELECT 'I am now running this query with the SQL editor "Untitled-1" now locally saved as "repro_test.sql" as context'

Affected Area

  • Agent mode
  • Ask mode
  • Slash commands
  • Code generation
  • Connection management
  • Schema exploration and object management
  • Query execution and performance advisor
  • Other (please describe below)

If you selected "Other", please describe the affected area

No response

Environment Information (Optional)

  • VS Code Version: 1.108.2 (installed via Scoop)
  • MSSQL Extension Version: 1.39.0
  • GitHub Copilot Extension Version: 1.388.0
  • GitHub Copilot Chat Extension Version: 0.36.2
  • Operating System: Microsoft Windows 11 Pro
  • Connection Type: SQL Server 2019 (Windows auth connection, on prem)

Confirmation

  • I have searched existing issues and couldn’t find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions