Skip to content

VSCode extension doesn't read env variables from ~/.claude/settings.json #21926

Description

@vincent4j

Description

After updating to version 2.1.25, the VSCode extension no longer reads environment variables from ~/.claude/settings.json.

When launching VSCode from Dock, the extension shows the login screen instead of entering chat mode, even though ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL are configured in settings.json.

Steps to Reproduce

  1. Configure ~/.claude/settings.json with:
    {
      "env": {
        "ANTHROPIC_API_KEY": "your-api-key",
        "ANTHROPIC_BASE_URL": "http://127.0.0.1:8045"
      }
    }
  2. Launch VSCode from Dock (not from terminal)
  3. Open Claude Code extension → shows login screen instead of chat

Expected Behavior

The extension should read env variables from ~/.claude/settings.json and enter chat mode directly.

Workaround

Setting system-level environment variables via launchctl setenv works, but this shouldn't be necessary.

Environment

  • macOS
  • Claude Code for VS Code: 2.1.25
  • Using local proxy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions