You want Claude Code inside VS Code, but you also want the configuration to be explicit, project-scoped, and safe to keep out of source control.
What you can do
Claude Code is a programming agent from Anthropic. In VS Code, the Claude Code extension gives you a native editor experience: a sidebar entry, a panel for asking coding questions, and the same underlying settings model used by the terminal CLI.
The useful part for a team project is that you do not have to put credentials into a shared repository-level config. You can create a local file under the project root, configure the API endpoint there, restart VS Code, and keep the token out of Git.
The Ace Data Cloud setup described here uses the Claude Code extension with these documented values:
- project-local settings file:
.claude/settings.local.json - base URL:
https://api.acedata.cloud - auth token variable:
ANTHROPIC_AUTH_TOKEN - automatic compaction window variable:
CLAUDE_CODE_AUTO_COMPACT_WINDOW - recommended compaction value from the guide:
850000
That is enough to make VS Code launch Claude Code with the project-specific environment you expect.
How it works
The VS Code extension and the terminal CLI read the same Claude Code settings. Instead of signing in through the official Anthropic account flow in the extension, you point Claude Code at the Ace Data Cloud proxy API by setting environment variables in Claude Code's settings file.
For a single project, create this file:
.claude/settings.local.json
Then put the following JSON inside it:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "{token}",
"ANTHROPIC_BASE_URL": "https://api.acedata.cloud",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "850000"
}
}
Replace {token} with the API token you copied from the Ace Data Cloud console. Keep the file local to the project and avoid committing it. The guide specifically recommends using settings.local.json for the current project and adding that path to .gitignore.
The CLAUDE_CODE_AUTO_COMPACT_WINDOW setting does not change the model's context limit. It sets the trigger window for automatic compression to around 850,000 tokens, leaving room for tool results and final answers.
Step 1: Install the Claude Code extension
Open the VS Code extension marketplace and search for Claude Code. Install the Claude Code extension, then accept the trust prompt shown by VS Code.
After installation, you should see a Claude Code entry in the VS Code sidebar. Opening it may lead you toward an official login prompt. For this workflow, you can skip that and configure the proxy API through the local settings file instead.
Step 2: Add project-local settings
From your project root, create the .claude directory and the local settings file:
mkdir -p .claude
cat > .claude/settings.local.json <<'JSON'
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "{token}",
"ANTHROPIC_BASE_URL": "https://api.acedata.cloud",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "850000"
}
}
JSON
Now edit the file and replace {token} with your real API token.
This pattern is intentionally boring: the base URL is visible, the credential is isolated, and the config is easy to remove when you no longer need it.
Step 3: Keep credentials out of Git
Add the local settings file to .gitignore:
printf '\n.claude/settings.local.json\n' >> .gitignore
Do not put the real token into .claude/settings.json if that file is shared with the team. The documented project-local file is a better place for personal or machine-specific credentials.
One more gotcha from the guide: if the environment that launches VS Code already has an old ANTHROPIC_API_KEY, unset it first. Do not treat an empty string as cleanup; actually remove the variable from that environment.
For example, if you launch VS Code from a shell:
unset ANTHROPIC_API_KEY
code .
Step 4: Restart or reload VS Code
After changing the settings file, restart or reload VS Code so the Claude Code extension reads the new environment values.
Open the Claude Code panel and ask a small project-aware question, such as:
Read the package scripts and explain how to run the test suite.
That is a good first prompt because it checks whether the extension can see your workspace and respond in context without making any destructive edits.
When to use project-local config vs global config
Use .claude/settings.local.json when you want one repository to use this setup and you do not want to affect every other project on your machine.
Use ~/.claude/settings.json only when you deliberately want the same configuration to apply across all projects. Even then, be careful with credential storage and with any older environment variables that might override what you expect.
For me, the local file is the safer default: it is visible while you are working on the project, easy to audit, and easy to keep out of commits.
A small checklist before you start editing code
Before asking Claude Code to modify files, I would check four things:
-
.claude/settings.local.jsonexists in the project root. -
ANTHROPIC_BASE_URLis exactlyhttps://api.acedata.cloud. -
ANTHROPIC_AUTH_TOKENis set to your token, not a placeholder. -
.claude/settings.local.jsonis ignored by Git.
Once those are true, you can use the Claude Code panel in VS Code as your normal coding assistant: ask it to explain code, inspect errors, propose diffs, or help navigate an unfamiliar repository.
The original Ace Data Cloud guide is here if you want to compare the exact setup notes: Claude Code VS Code setup guide.
Top comments (0)