[BUG] Environment Contributions warning continuously reappears

Open 💬 40 comments Opened Jul 10, 2025 by pattobrien

Environment

Claude Code Status v1.0.25

Bug Description

On every open of Cursor or VSCode IDEs, the below warning always reappears in the integrated terminal:

The following extensions want to relaunch the terminal to contribute to its environment:

Claude Code

The user must constantly restart the terminal in order to get environment contributions to take effect. This is not the case for other popular VSCode / Cursor extensions.

<img width="612" height="341" alt="Image" src="https://github.com/user-attachments/assets/dc6936e6-222f-40d1-ba55-eb0a0ce1041c" />

View original on GitHub ↗

40 Comments

michaelitvin · 1 year ago

Happens to me too when running on Windows.

Claude Code Extension:
Identifier: anthropic.claude-code
Version: 1.0.31
Last Updated: 2025-07-05, 09:48:11
Published: 2025-06-18, 19:32:16
Last Released: 2025-06-21, 00:39:28

VSCode:
Version: 1.102.0 (user setup)
Commit: cb0c47c0cfaad0757385834bd89d410c78a856c0
Date: 2025-07-09T22:10:34.600Z
Electron: 35.6.0
ElectronBuildId: 11847422
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Windows_NT x64 10.0.26100

kenryu42 · 1 year ago

Same.

Claude Code Extension:
Identifier: anthropic.claude-code
Version: 1.0.51
Last Updated: 2025-07-15, 14:23:54
Source: VSIX

Cursor:
Version: 1.2.4 (Universal)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:55:16.443Z (4 days ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

brentforder · 12 months ago

I just installed it for the first time to evaluate Claude Code for free, and I'm encountering this nuisance with every VSCode restart :/

Claude Code Extension:
Identifier: anthropic.claude-code
Version: 1.0.51
VSCode Version: 1.102.1 (Windows)
Last Updated: 2025-07-18, 16:01:53
Source: VSIX

jacobhallgren · 12 months ago

Same here, annoying

piotrpalek · 11 months ago

Same here, and disabling the ide integration / uninstalling it in vscode doesn't help either

jacobhallgren · 11 months ago

Please fix this. very annoying to setup terminal layout each vscode start.

dmytr0-wt · 11 months ago
Please fix this. very annoying to setup terminal layout each vscode start.

Agree! Please fix it!

cookiepingyen · 11 months ago

Same here!

Claude Code Extension:
Identifier anthropic.claude-code
Version 1.0.64
Last Updated 2025-07-31, 18:01:02
Source VSIX

VSCode:
Version: 1.102.3 (Universal)
Commit: 488a1f239235055e34e673291fb8d8c810886f81
Date: 2025-07-29T03:00:23.339Z (2 days ago)
Electron: 35.6.0
ElectronBuildId: 11847422
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 24.5.0

tylerawalker · 10 months ago

Any updates on this?

Claude code extension:
Identifier: anthropic.claude-code
Version: 1.0.96
Last Updated: 2025-08-29, 09:50:48

VSCode:
Version: 1.103.2 (Universal)
Commit: 6f17636121051a53c88d3e605c491d22af2ba755
Date: 2025-08-20T16:45:34.255Z (1 wk ago)
Electron: 37.2.3
ElectronBuildId: 12035395
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin arm64 24.5.0

vjekob · 10 months ago

This is unbelievably annoying. My toolchain depends on 5 separate terminal windows, all of which couldn't care less about Claude Code, yet Claude Code extension wants to "contribute" to them?

The only terminal that Claude should care about is the one that opens when Claude Code's terminal icon is clicked.

This requires fixing. Until it gets it, the extension stays off for me, because anything useful it does is massively overshadowed by annoying terminal warnings.

jacobhallgren · 10 months ago

Yeah what is the status here?

christopher-buss · 10 months ago

There are extensions such as Mise that have a setting to automatically restart terminals when they want to contribute to the environment variable - perhaps an option like this could happen if the extension needs to contribute?

I have to have this setting off with Claude because it restarts the terminal and then I lose the Claude Code chat as it doesn't know how to restart from it - so maybe it could restart the terminal + CC has the ability to auto-continue where it left off when restarted like this.

brianpaden · 9 months ago

Still seeing issue:

VS Extension:
Identifier
anthropic.claude-code
Version
1.0.123
Last Updated
2025-09-24, 00:02:03

VS Code:
Version: 1.104.0 (user setup)
Commit: f220831ea2d946c0dcb0f3eaa480eb435a2c1260
Date: 2025-09-10T06:46:18.035Z
Electron: 37.3.1
ElectronBuildId: 12342881
Chromium: 138.0.7204.235
Node.js: 22.18.0
V8: 13.8.258.31-electron.0
OS: Windows_NT x64 10.0.26100

mvc24 · 9 months ago

Same here, this really needs to be fixed. I need to be able to see which terminal is which, and not just this:

<img width="261" height="170" alt="Image" src="https://github.com/user-attachments/assets/0edf920c-a0f2-405e-a5f3-db674fd48a67" />

OrzMiku · 9 months ago

This bug is so annoying, making me feel like ants are crawling all over me

tjx666 · 9 months ago

So annoying:

<img width="646" height="733" alt="Image" src="https://github.com/user-attachments/assets/2797cdb4-7de6-4de4-8d70-d4a36be32423" />

hexadecimal233 · 7 months ago

copilot is prompting me to restart terminal as well:

<img width="772" height="118" alt="Image" src="https://github.com/user-attachments/assets/0f4d2b25-c977-45c9-b570-2bc84544791a" />

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

christopher-buss · 6 months ago

Still exists

AlexRuiz7 · 6 months ago

Really annoying.

ElectQ · 5 months ago

This issue is indeed very annoying and has affected the daily user experience of many. We hope the development team can fix this problem as soon as possible, allowing the terminal environment contribution feature to work properly and reduce unnecessary restart operations.

hcai-soundhound · 5 months ago

Still there.

DBrider3 · 5 months ago

This is not a fundamental solution, but install the Auto Run Command extension and add this to settings.json to get a new terminal after Claude Code initializes:

"auto-run-command.rules": [
    {
        "command": [
            "workbench.action.terminal.killAll",
            "workbench.action.terminal.new"
        ],
        "delay": 5000,
        "scope": "folderOpen"
    }
]
amargolis · 4 months ago
This is not a fundamental solution, but install the Auto Run Command extension and add this to settings.json to get a new terminal after Claude Code initializes: `` "auto-run-command.rules": [ { "command": [ "workbench.action.terminal.killAll", "workbench.action.terminal.new" ], "delay": 5000, "scope": "folderOpen" } ] ``

Will this kill all of my open terminal windows from the previous session? For example, if I have four CC terminal windows in VS Code, when I quit VS Code and relaunch, will those four terminal windows be gone, or will they be magically reconnected to Claude Code?

james-berkheimer · 3 months ago

Experiencing this issue on a Remote SSH setup (VS Code connecting to a Linux host). The terminal continuously requests a relaunch to contribute to the Claude Code extension's environment.

The following settings have no effect on the behavior:

  • "terminal.integrated.environmentChangesRelaunch": false (set in both User and Remote scopes)
  • "terminal.integrated.environmentChangesIndicator": "off" (deprecated)
  • "terminal.integrated.experimental.aiProfileGrouping": false

Disabling the Claude Code extension on the remote side stops the relaunch loop. Re-enabling it brings it back immediately.

The extension's useTerminal setting is unchecked — the extension is not configured to use the terminal as its UI, yet it still injects environment variables into every terminal instance and triggers the relaunch prompt.

Environment:

  • Platform: Remote SSH (Linux host)
  • VS Code with Remote - SSH extension
  • Claude Code for VS Code (latest: 2.1.86)
  • Shell: bash
  • Python 3.11.11 (.venv)
yurukusa · 3 months ago

This warning appears because the Claude Code extension modifies the terminal environment (adding PATH entries, env vars) on every IDE launch, and VSCode/Cursor detects that and prompts for a restart.
Workaround 1 — Auto-accept environment contributions:
In VSCode/Cursor settings, add:

{
  "terminal.integrated.environmentChangesRelaunch": false
}

This tells the IDE to apply environment changes silently without showing the warning or requiring a restart.
Workaround 2 — Disable terminal environment integration:
If the Claude Code extension's terminal environment changes aren't important to your workflow (they mainly ensure claude is on PATH):

{
  "claude-code.terminalEnvironment": false
}

(Check the exact setting name in the extension's settings page — it may vary by version.)
Workaround 3 — Add claude to PATH manually:
If claude is already on your system PATH, the extension's environment contribution is redundant. Verify with:

which claude

If it resolves, you can safely disable the extension's terminal integration without losing functionality.

james-berkheimer · 3 months ago
This warning appears because the Claude Code extension modifies the terminal environment (adding PATH entries, env vars) on every IDE launch, and VSCode/Cursor detects that and prompts for a restart. Workaround 1 — Auto-accept environment contributions: In VSCode/Cursor settings, add: { "terminal.integrated.environmentChangesRelaunch": false } This tells the IDE to apply environment changes silently without showing the warning or requiring a restart. Workaround 2 — Disable terminal environment integration: If the Claude Code extension's terminal environment changes aren't important to your workflow (they mainly ensure claude is on PATH): { "claude-code.terminalEnvironment": false } (Check the exact setting name in the extension's settings page — it may vary by version.) Workaround 3 — Add claude to PATH manually: If claude is already on your system PATH, the extension's environment contribution is redundant. Verify with: which claude If it resolves, you can safely disable the extension's terminal integration without losing functionality.

Appreciate the response, but none of the workarounds work for my setup:

Workaround 1: "terminal.integrated.environmentChangesRelaunch": false is already set in both User and Remote scopes. It does not prevent the relaunch prompt in a Remote SSH context.

Workaround 2: "claude-code.terminalEnvironment" is not a recognized setting. VS Code flags it as unknown and it has no effect.

Workaround 3: which claude returns nothing. Claude Code is installed only as a VS Code extension — there is no CLI binary on the remote host. There is nothing to add to PATH.

The core issue is that the extension injects terminal environment changes even when claudeCode.useTerminal is false and the extension is used exclusively from the panel. If the environment contribution exists solely to put claude on PATH for CLI usage, it should not activate when the CLI is not installed and the terminal UI is disabled.

jappp · 3 months ago

Still there.

TaufiqSyed · 3 months ago

I'm just hiding VS Code terminal tabs till this is fixed. It's kind of distracting to have a yellow warning marker on a clean project.

dortega-fce · 3 months ago

+1

RE-codes · 3 months ago

It's coming up on a _year_ with this bug. This is not confidence inspiring. A half-trillion dollar company selling the most advanced technology ever created. And they ship this bug over and over....

jachin84 · 3 months ago

This is very frustrating, please fix.

mvc24 · 1 month ago

This is still happening, please finally fix it!

antonioborondo · 1 month ago

+1

patrick-martin-39797 · 1 month ago

Super annoying, please fix!

Misyra · 1 month ago

+1

filipecustodio · 17 days ago

Bug exists in my environment too (Mac OS + latest VS Code + latest Claude Code VS Code plugin).

quicmic · 13 days ago

Please fix that soon!

andrea-cerlini · 6 days ago

Happy one year anniversary of this unresolved issue 🎉
I have it too, on Windows 11, latest VS Code version, latest VS Code Claude Code extension version

igornassif · 2 days ago

Still happening.