Skip to content

Restored integrated terminal sessions not using workspace profile #263504

@erhhung

Description

@erhhung

Does this issue occur when all extensions are disabled?: YES

Version: 1.103.0 (Universal)
Commit: e3550cf
Date: 2025-08-06T21:40:10.271Z
Electron: 37.2.3
ElectronBuildId: 12035395
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin x64 24.6.0

Steps to Reproduce:

  1. Create workspace-specific terminal profile in .vscode/settings.json that loads .bash_profile with shell functions and aliases which are specific to the project:
{
  "terminal.integrated.defaultProfile.osx": "bash",
  "terminal.integrated.profiles.osx": {
    "bash": {
      "path": "/usr/local/bin/bash",
      "args": ["--rcfile", ".vscode/.bash_profile"],
      "icon": "terminal-bash"
    }
  }
}

It doesn't really matter what .vscode/.bash_profile contains. A simple alias will demonstrate the issue.

  1. Open a new integrated terminal window. The shell should be sourced with the contents of .vscode/.bash_profile. This can also be verified:
$ ps auxw | grep '\b'$$'\b'
erhhung  19604  0.0  0.0 34884824  21348 s013  Ss  4:03PM  0:01.87 /usr/local/bin/bash --rcfile .vscode/.bash_profile
  1. Restart VSCode (or when prompted to restart for upgrade).

  2. VSCode restores all previously opened windows, including workspace tabs and integrated terminal sessions. However, restored terminal sessions that were previously launched using a workspace-specific profile are no longer relaunched using that profile:

$ ps auxw | grep '\b'$$'\b'
erhhung  15265  1.7  0.0 35448024  22040 s009  Ss  3:50PM  0:03.20 /usr/local/bin/bash -l

The restored terminal session was instead launched using the global terminal profile, which lacks the additional shell functions and aliases needed for that workspace.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugconfirmation-pendingterminal-persistenceRelating to process reconnection or process reviveterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions