Copilot Chat: ADO auth-change handler re-fetches semanticsearchstatus on every event (missing session-id dedup)
@mjbvz is already working on this.
Since Jun 9, 2026.
Assessment
This issue has not been assessed yet.
Description
Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.123.0 (system setup)
- OS Version: Windows_NT x64 10.0.26200
Steps to Reproduce:
- Open VS Code with a workspace containing 2+ Azure DevOps repositories.
- Sign in via the Microsoft auth provider.
- Wait for all repos to reach
Ready. - Switch focus to another window and back (or open a new chat turn).
- In Dev Tools → Network, observe: one
GET …/semanticsearchstatusrequest fires per ADO repo, every time, even though the repos are alreadyReady.
Expected: No re-fetch when nothing changed.
Actual: N requests per event per user, indefinitely.
Root cause
In extensions/copilot/src/platform/workspaceChunkSearch/node/codeSearch/codeSearchChunkSearch.ts, the GitHub auth-change handler already dedupes no-op events by comparing session ids (lines 175–188). The ADO handler (lines 190–195) doesn't - it fires updateRepoStatuses('ado', …) on every event regardless of whether anything actually changed.
Suggested fix
Apply the same session-id dedup that GitHub already has. Sketch:
// codeSearchChunkSearch.ts, replace lines 190-195
{
let lastAdoSessionId = this._authenticationService.anyAdoSession?.id;
this._register(Event.any(
this._authenticationService.onDidAdoAuthenticationChange,
this._adoCodeSearchService.onDidChangeIndexState
)(() => {
const adoSessionId = this._authenticationService.anyAdoSession?.id;
if (adoSessionId === lastAdoSessionId) {
return;
}
lastAdoSessionId = adoSessionId;
this.updateRepoStatuses('ado', new TelemetryCorrelationId('CodeSearchChunkSearch::onDidAdoChange'));
}));
}
Related to commit https://github.com/microsoft/vscode/commit/9e2a9e36812ae9065a6841702229f41859d064b8 which mapped 401/403 to 'not-authorized' and made NotAuthorized sticky in refreshStatusFromEndpoint. That change stopped the silent retry loop for misconfigured users. This issue covers the remaining steady-state volume from healthy authenticated users, which has the same root pattern - updateRepoStatuses firing even when nothing changed.
(Optional, separate) Bonus improvement
updateRepoStatuses calls refreshStatusFromEndpoint(true, …) (line 1003), which forces a network refresh even for repos already in Ready. Adding a short TTL (e.g., 5–10 min) so Ready is sticky would further reduce request volume, but is a larger change. Happy to file separately if useful.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·