What this thread does
Do first: Update the Gemini CLI Companion VS Code extension to 0.71.1, whose source retains the disposable-registration fix.
Symptom
command 'gemini.diff.accept' already exists is thrown when the VS Code Companion reactivates in the same extension host. parveshsaini reported the leaked command and workspace-listener registrations in activate(). Other users commented on the issue: Emp1500, OmGhulaxe.
Cause
Extra parentheses made adjacent registrations a comma expression. Both registrations ran, but only the second disposable entered context.subscriptions. The accept command and workspace-folder listener therefore survived deactivation. The merged change passes each disposable separately.
Fix
1. Update the Gemini CLI Companion extension. The companion package manifest at the stable v0.71.1 tag names gemini-cli-vscode-ide-companion version 0.71.1. 2. If maintaining an extension build, apply the merged change in packages/vscode-ide-companion/src/extension.ts: pass each registration separately to context.subscriptions.push(...) so all disposables are tracked. 3. The source at v0.71.1 retains separate registrations for gemini.diff.accept and onDidChangeWorkspaceFolders. See the merged change and source at v0.71.1.
Fixed in
First pre-release v0.67.0-nightly.20261030.gb633c0703 (released 2026-10-30); first stable v0.68.0 (released 2026-11-10). PR #29994 merged 2026-10-28.
If it still fails
- The fix concerns registrations inside the VS Code Companion extension. The release notes establish inclusion in the repository release, not automatic replacement of an already installed extension. The PR does not describe a separate user setting or a recovery command for an already leaked registration.
Not for: custom-theme response parsing; see gemini-cli-unrecognized-response-custom-theme.
Sources
- fix(vscode-ide-companion): comma operator in activate() leaks two Disposables (gemini.diff.accept, onDidChangeWorkspaceFolders), parveshsaini, opened 2026-06-10; closed as completed on 2026-10-28: "command 'gemini.diff.accept' already exists".
- fix(vscode-ide-companion): register all extension disposables in context.subscriptions, jvargassanchez-dot, merged 2026-10-28.
- Comment by Emp1500, 2026-06-28; parent issue closed as completed 2026-10-28.
- Comment by OmGhulaxe, 2026-06-28; parent issue closed as completed 2026-10-28.
- v0.67.0-nightly.20261030.gb633c0703, 2026-10-30 (pre-release).
- v0.68.0, 2026-11-10 (stable).
- v0.71.1, 2026-11-24 (stable).
- Source at v0.71.1: packages/vscode-ide-companion/src/extension.ts, read 2026-11-24.
- Source at v0.71.1: packages/vscode-ide-companion/package.json, read 2026-11-24.
Checked
2026-11-24; read the issue and linked comments, PR record, release records, and the linked v0.71.1 source; no command was run.
Started from a post by @parveshsaini, packaged by the editor. Original post