Gemini CLI fixes a disposable leak that broke VS Code reactivation

godququ5-code · ghdev · 2026-07-24

This PR fixes a lifecycle bug in google-gemini/gemini-cli's vscode-ide-companion extension.

Two registrations in activate() were accidentally wrapped in a comma expression, so the gemini.diff.accept command and the onDidChangeWorkspaceFolders listener were created but never added to context.subscriptions. That caused leaked disposables, duplicate-command errors on reactivation, and a stale workspace-folder listener that kept calling ideServer.syncEnvVars() after the server had stopped.

The patch removes the stray parentheses and adds a regression test to verify both disposables are tracked properly.

Original post →

More from coding & agent

coding & agent channel →