Skip to content

fix(copilot): start on first use, stop with AI off, pin the version - #3365

Merged
datlechin merged 2 commits into
mainfrom
fix/copilot-lifecycle
Oct 12, 2026
Merged

datlechin merged 2 commits into
mainfrom
fix/copilot-lifecycle

Conversation

@datlechin

@datlechin datlechin commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Why

The Copilot language server (a Node process) started at launch whenever AI was on and any Copilot provider existed, even with another provider active. It kept running after AI was turned off. Its binary came from npm latest, checked only against a hash from the same response.

Change

  • Copilot starts on first use: a chat message, its inline suggestions, its provider sheet, or its row in Settings > AI. Never at launch, and never for a turn queued before AI was turned off.
  • It stops when AI is turned off, when the Copilot provider is removed, and when a new Copilot provider sheet is cancelled.
  • The language server is pinned to 1.551.2 with SHA-256 digests of the npm archive and the binary per architecture, re-checked before each launch.
  • After a restart, Copilot chat starts a new server conversation seeded with the earlier exchanges, and the model list fetches again once Copilot is up.

Verified

CopilotLifecycleTests covers when to stop; CopilotBinaryManagerTests installs from a stubbed tarball and refuses a wrong archive, another version and an altered binary; CopilotPriorExchangesTests covers the seeded history.

Not in this PR

Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
@datlechin
datlechin merged commit 54175e0 into main Oct 12, 2026
@datlechin
datlechin deleted the fix/copilot-lifecycle branch October 12, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant