Exporting ANTHROPIC_BASE_URL does not reach the Claude Code panel in VSCode
export ANTHROPIC_BASE_URL=http://127.0.0.1:20128 in your shell routes the claude CLI to a local endpoint. Open the Claude Code panel in VSCode in the same project and it still talks to Anthropic directly. The two live on different environment surfaces, and that is the whole problem. Why the shell variable does not carry over The CLI reads the environment of the process you started it from. The…
The Claude Code panel in Visual Studio Code does not inherit the ANTHROPIC_BASE_URL environment variable set in the shell. The VSCode extension spawns its agent process from the VSCode window process, which does not have the same environment settings as the shell that set the variable. As a result, when you open the Claude Code panel in VSCode, it continues to connect directly to Anthropic instead of using the local endpoint specified by the ANTHROPIC_BASE_URL shell variable.
The panel only receives the variable when VSCode is launched from a terminal that already has the variable set.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.
- Anthropic certification: the Claude (CCAR-F) credential, explained dev.to
- Anthropic details Claude's text watermark: it only shows Claude was likely involved, is sparse in code and factual text, and disappears after a full rewrite (Anthropic) anthropic.com
- Techies have concerns about Claude's hidden watermark. Anthropic has some answers. businessinsider.com
- European regulators seek Claude usage data from Anthropic, upsetting some users timesofindia.indiatimes.com
- Anthropic watermarking Claude AI content | Explained thehindu.com