Change:
Currently we enable the persistent terminal/reconnect feature if a terminal is launched by an extension, unlike the env var relaunch where we disable outright because it can cause issues with the extension as it loses access to the terminal upon relaunch. Relaunching the PowerShell extension right now for example is a bit of a weird experience though because it creates the "PowerShell Integrated Console", and that reconnects upon reload but is no longer managed by the extension. Before reload: ! After reload it is restored, but no longer owned by the extension: ! Assigning to March for exploration. Thoughts
I think just allowing opt-out/opt-in on this behavior would be more than enough for PowerShell's case.
Has there been any progress on this? Now that persistent terminals are the default, this gets quite annoying and bothers users when extension-owned terminals come back but aren't actually connected.
No progress, we'll try get it in the next version
proposal:
Is this still ongoing and targeted for February?
Yes it is

Discussion:
* or via Size to Content Width */ fixedDimensions?: IFixedTerminalDimensions; <ins> /** * Opt-out of the default terminal persistence on restart and reload */ disablePersistence?: boolean; </ins> } export interface ICreateContributedTerminalProfileOptions {

isFeatureTerminal: launchConfig.isFeatureTerminal, isExtensionOwnedTerminal: launchConfig.isExtensionOwnedTerminal, useShellEnvironment: launchConfig.useShellEnvironment, <ins> disablePersistence: launchConfig.disablePersistence </ins> }; const terminal = Promises.withAsyncBody<ITerminalInstance>(async r => { const terminal = await this._terminalService.createTerminal({

isExtensionOwnedTerminal?: boolean; useShellEnvironment?: boolean; location?: TerminalLocation | { viewColumn: number, preserveFocus?: boolean } | { parentTerminal: ExtHostTerminalIdentifier } | { splitActiveTerminal: boolean }; <ins> disablePersistence?: boolean; </ins> } export interface MainThreadTerminalServiceShape extends IDisposable {

isFeatureTerminal: withNullAsUndefined(internalOptions?.isFeatureTerminal), isExtensionOwnedTerminal: true, useShellEnvironment: withNullAsUndefined(internalOptions?.useShellEnvironment), <del> location: internalOptions?.location || this._serializeParentTerminal(options.location, internalOptions?.resolvedExtHostIdentifier) </del> <ins> location: internalOptions?.location || this._serializeParentTerminal(options.location, internalOptions?.resolvedExtHostIdentifier), disablePersistence: withNullAsUndefined(options.disablePersistence) </ins> }); }

} get persistentProcessId(): number | undefined { return this._processManager.persistentProcessId; } <del> get shouldPersist(): boolean { return this._processManager.shouldPersist; } </del> <ins> get shouldPersist(): boolean { return this._processManager.shouldPersist && !this.shellLaunchConfig.disablePersistence; } </ins> /** * Create xterm.js instance and attach data listeners.

taskPresentationGroup: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts', terminalDataWriteEvent: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts', terminalDimensions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts', <ins> terminalDisablePersistence: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDisablePersistence.d.ts', </ins> terminalNameChangeEvent: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalNameChangeEvent.d.ts', testCoverage: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts', testObserver: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts',

<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ declare module 'vscode' { export interface TerminalOptions { /** * Opt-out of the default terminal persistence on restart and reload */ disablePersistence?: boolean; } export interface ExtensionTerminalOptions { /** * Opt-out of the default terminal persistence on restart and reload */ disablePersistence?: boolean; } } </ins>