Extension webviews deadlock on cold startup until built-in GitHub Copilot Chat extension is toggled
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: No
VS Code Version
```text
Version: 1.134.0
Commit: 110a328ea54b42367b803ec53ee0bf52ef26b419
Date: 2026-08-18T18:24:44Z (2 days ago)
Electron: 42.8.1
ElectronBuildId: 14906494
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
@github/copilot: 1.0.81-0
@github/copilot-sdk: 1.0.11
OS: 110a328ea54b42367b803ec53ee0bf52ef26b419
```
- OS Version: macOS `26.5.2`
Steps to Reproduce:
1. Have GitLens and Antigravity installed. BTW Antigravity is brand new. [Antigravity Extension](https://marketplace.visualstudio.com/items?itemName=Google.google-antigravity)
2. Cold start / restart VS Code.
3. Observe that webviews (such as GitLens Commit Graph) fail to initialize and log divergence warnings.
4. Toggle the built-in GitHub Copilot Chat extension state (either Enabled ➔ Disabled or Disabled ➔ Enabled).
5. Webviews immediately unfreeze and ~~work normally for the rest of the session until the next restart~~ GitLens doesn't actually work for doing commits and pushes etc. It just looks like it would because it shows the git changed files.
Click to view logs / stack trace
```text
log.ts:117 INFO Started local extension host with pid 35766.
webviewElement.ts:427 WARN Unrecognized feature: 'local-network-access'.
webviewElement.ts:507 WARN An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
log.ts:117 ERR [Extension Host] (node:35766) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead.
index.html (extensionId=google.google-antigravity) WARN Unrecognized feature: 'local-network-access'.
index.html (extensionId=eamodio.gitlens) WARN Unrecognized feature: 'local-network-access'.
log.ts:117 ERR [Extension Host] (node:35766) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
log.ts:117 INFO [AccountPolicyGate] apply: state=inactive, reason=undefined, isRestricted=false
log.ts:117 ERR Unable to create workbench contribution 'chat.contextContributions'. Error: [createInstance] _St depends on UNKNOWN service chatSessionRoutingProviderService.
at s._throwIfStrict (instantiationService.ts:392:10)
at s._createInstance (instantiationService.ts:142:10)
at s.createInstance (instantiationService.ts:128:18)
at new WCe (chatContext.ts:113:1)
at s._createInstance (instantiationService.ts:162:18)
at s.createInstance (instantiationService.ts:128:18)
at s.safeCreateContribution (contributions.ts:381:42)
at l (contributions.ts:349:10)
at doInstantiateWhenIdle (contributions.ts:366)
at doInstantiateByPhase (contributions.ts:332)
requestImpl.ts:33 GET https://api.github.com/copilot_internal/managed_settings 404 (Not Found)
log.ts:117 INFO Settings Sync: Account status changed from uninitialized to unavailable
console.ts:139 [Extension Host] octokit.rest.search.issuesAndPullRequests() is deprecated
console.ts:139 [Extension Host] [Jetski] Loading iframe URL: http://127.0.0.1:50194/...
bridge.js:2140 [Jetski] Cannot watch internal iframe navigation due to cross-origin restriction. Only watching src attribute.
main.js:12986 [useNativeStoragePolyfill] Injecting nativeStorage polyfill
log.ts:117 INFO [AccountPolicyGate] apply: state=inactive, reason=undefined, isRestricted=false
```
When i delete Antigravity, the issue is 100% resolved.
Because Antigravity registers as an AI / Chat participant in VS Code:
Triggers the Broken Service: When Antigravity is installed, VS Code detects an agentic chat provider and tries to initialize chat.contextContributions on boot. That code path hits the missing chatSessionRoutingProviderService and crashes the workbench startup.
Without Antigravity: If no active extension requests the chat contribution pipeline on startup, VS Code never executes that specific broken dependency check, allowing GitLens to initialize normally without hitting the crash.
**UPDATE / Workaround: (yes AI but it works)**
Isolating the extensions into separate Extension Host processes resolves the issue:
```json
"extensions.experimental.affinity": {
"eamodio.gitlens": 1,
"google.google-antigravity": 2
}
Why this works:
Process Isolation: By default, VS Code runs all extensions inside a single localProcessExtensionHost Node.js process. Configuring process affinity forces VS Code to spawn dedicated extension host instances with separate event loops and memory heaps.
Prevents Startup Failure Cascading: When Antigravity registers chat contributions on boot, the chatSessionRoutingProviderService DI crash in chat.contextContributions is now contained inside Process #2. It no longer aborts the startup lifecycle or orphans webview IPC message ports for GitLens running in Process #1.
No Daemon / Webview Port Contention: Both extensions run their background daemons and webview IPC bridges independently without message port timeouts or dropped packets.
Contributor guide
Research direction
Reproduce the cold-start failure with GitLens and Antigravity installed, then inspect the chat.contextContributions error and the dependency path through instantiationService.ts, chatContext.ts, and contributions.ts. Verify whether the startup failure leaves GitLens webviews unusable; done means both extensions initialize correctly after a restart without toggling Copilot Chat or configuring extension affinity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100