Skip to content

Environment variables not written: VS Code Claude plugin

Quick fix

Check VS Code settings.json for Claude environment variables; if present, comment them out and reopen Claude.

Error output
功能都开了,环境变量没有写进去,重启也不管用,终端能正常走代理。
English translation

All features are enabled, but the environment variables are not written. Restarting does not help, while the terminal can use the proxy normally.

A comment suggests that if `claudeCode.environmentVariables` is configured in VS Code `settings.json`, you should comment out the Claude environment variables and reopen Claude. The maintainer also suggests disabling and re-enabling the related feature, though one user reported that this did not resolve the issue. Comments also mention that the selected model may not be supported by the relay; check Claude VSCode output in `OUTPUT`. The issue does not confirm the cause of these cases.

  1. If you previously configured `claudeCode.environmentVariables` in VS Code `settings.json`, comment out the related settings and reopen Claude.

  2. Try disabling and re-enabling the related feature in cc-switch. If that does not work, check Claude VSCode output in `OUTPUT` to confirm whether the selected model is supported by the relay.

ToolClaude Code(VS Code 插件)
VersionUnknown
PlatformsWindowsmacOS

This page is distilled from 1 real issues

Where is `settings.json` located?
A comment gives the macOS path as `~/Library/Application Support/Code/User/settings.json`.
What should I do if disabling and re-enabling the feature does not work?
Check whether `claudeCode.environmentVariables` is configured in VS Code `settings.json`; you can also check Claude VSCode output in `OUTPUT`.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.