From 12545274ea1cc5b73dc28ef60c0d5e3a53190cc2 Mon Sep 17 00:00:00 2001 From: David Brailovsky Date: Wed, 15 Jul 2026 15:14:55 +0000 Subject: [PATCH] windows: reset pi terminal title after checking npm packages on windows the npm check changes the terminal title and it doesn't change back this is a narrow fix for it fixes #6629 --- .../src/modes/interactive/interactive-mode.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index 20ddbf49..f9545f33 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -833,11 +833,19 @@ export class InteractiveMode { }); // Start package update check asynchronously - this.checkForPackageUpdates().then((updates) => { - if (updates.length > 0) { - this.showPackageUpdateNotification(updates); - } - }); + this.checkForPackageUpdates() + .then((updates) => { + if (updates.length > 0) { + this.showPackageUpdateNotification(updates); + } + }) + .finally(() => { + // On Windows, npm can overwrite the shared console title while checking + // extension package versions. Restore Pi's title after the startup check. + if (process.platform === "win32" && this.isInitialized) { + this.updateTerminalTitle(); + } + }); // Check tmux keyboard setup asynchronously this.checkTmuxKeyboardSetup().then((warning) => {