Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.78.0 OS Version: Mac OS 13.3.1 Steps to Reproduce: a new VSCode window using Codespaces. initial terminal window opens a terminal. If I kill that terminal and open a new terminal, I get as expected. I have in my I believe this is a duplicate of these closed issues:
I was expecting this would get fixed as part of , cc
It got , but it only repros using codespaces extension now, before I was able to repro with test resovler extension and remote ssh extension which works as expected now, not sure what's special about codespaces extension as the remote connection logic is the same :thinking:
Ah I can repro now, will take a look, it's because codespaces takes 20s to resolve the remote Edit: There's a :laughing:
PR
/duplicate

Discussion:
declare _serviceBrand: undefined; private _webExtensionContributedProfileContextKey: IContextKey<boolean>; <del> private _profilesReadyBarrier: AutoOpenBarrier; </del> <ins> private _profilesReadyBarrier: AutoOpenBarrier | undefined; private _profilesReadyPromise: Promise<void>; </ins> private _availableProfiles: ITerminalProfile[] | undefined; private _contributedProfiles: IExtensionTerminalProfile[] = []; private _defaultProfileName?: string;

private readonly _onDidChangeAvailableProfiles = new Emitter<ITerminalProfile[]>(); get onDidChangeAvailableProfiles(): Event<ITerminalProfile[]> { return this._onDidChangeAvailableProfiles.event; } <del> get profilesReady(): Promise<void> { return this._profilesReadyBarrier.wait().then(() => { }); } </del> <ins> get profilesReady(): Promise<void> { return this._profilesReadyPromise; } </ins> get availableProfiles(): ITerminalProfile[] { if (!this._platformConfigJustRefreshed) { this.refreshAvailableProfiles();

this._webExtensionContributedProfileContextKey = TerminalContextKeys.webExtensionContributedProfile.bindTo(this._contextKeyService); this._updateWebContextKey(); <del> // Wait up to 5 seconds for profiles to be ready so it's assured that we know the actual // default terminal before launching the first terminal. This isn't expected to ever take // this long. this._profilesReadyBarrier = new AutoOpenBarrier(20000); </del> <ins> this._profilesReadyPromise = this._remoteAgentService.getEnvironment() .then(() => { // Wait up to 20 seconds for profiles to be ready so it's assured that we know the actual // default terminal before launching the first terminal. This isn't expected to ever take // this long. this._profilesReadyBarrier = new AutoOpenBarrier(20000); return this._profilesReadyBarrier.wait().then(() => { }); }); </ins> this.refreshAvailableProfiles(); this._setupConfigListener(); }

if (profilesChanged || contributedProfilesChanged) { this._availableProfiles = profiles; this._onDidChangeAvailableProfiles.fire(this._availableProfiles); <del> this._profilesReadyBarrier.open(); </del> <ins> this._profilesReadyBarrier!.open(); </ins> this._updateWebContextKey(); await this._refreshPlatformConfig(this._availableProfiles); }