microsoft / microsoft/vscode-mssql
[Bug]: A query is already running for this editor session
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
### Description
When working with queries multiple people in our team regularly get the message `A query is already running for this editor session. Please cancel this query or wait for its completion.`. But we are unable to cancel the query or disconnect the connection. In other connected files I cannot even change the connection
I cannot figure out what this cause is and have no direct steps to reproduce it. The only way to recover from this message, is to reload the windows or restart vscode.
I have enabled verbose logging, but could not find anything in the logging pointing to the cause of the problem. With 4 people in our experiencing the same problem, there must be other people also experiencing this same behavior for this problem to be taken serious.
### Steps to Reproduce
Mostly happens when executing different queries again and again in the same open tab session.
### Affected Area
- [ ] Connection dialog (SQL Server | Azure browse/Fabric browse)
- [x] Query editor
- [ ] Query results panel
- [ ] Object Explorer
- [ ] GitHub Copilot integration
- [ ] Preview/Edit data
- [ ] Table Designer
- [ ] Schema Designer
- [ ] Schema Compare
- [ ] Local SQL Server Container provisioning
- [ ] SQL database in Fabric provisioning
- [ ] DACPAC/BACPAC export/import
- [ ] SQL Database projects
- [ ] Query Plan Visualizer
- [ ] Other (please describe below)
### If you selected "Other", please describe the affected area
_No response_
### Environment Information
Version: 1.137.0 (user setup)
Commit: 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c
Date: 2026-09-08T13:43:59-07:00
Electron: 42.10.0
ElectronBuildId: 15109253
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
@github/copilot: 1.0.84.70.gdb75d0d
@github/copilot-sdk: 1.0.13-preview.4
OS: Windows_NT x64 10.0.26200
### Confirmation
- [x] I have searched existing issues and couldn't find a match
- [x] I want to work on this issue
Contributor guide
No contributing guide indexed for this repository
Research direction
No files or tests are named in the issue. Start by repeatedly executing queries in the same open editor tab on the reported VS Code SQL Server extension version, then inspect the verbose logs and query-editor state when the lock appears. Done means the query can be cancelled, the connection disconnected or changed, and the editor recovers without reloading VS Code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql, typescript
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100