FAQ · Claude Code
Claude Code reports it can't connect to Anthropic services
After installing Claude Code for the first time and running claude, you may hit an error like:
Unable to connect to Anthropic services
Failed to connect to api.anthropic.comOr it keeps asking you to log in. This usually means the first-run onboarding didn't complete. Use the command below to mark initialization as done, then restart Claude Code:
powershell -Command "$f='%USERPROFILE%\.claude.json';$j=Get-Content $f|ConvertFrom-Json;$j|Add-Member -NotePropertyName 'hasCompletedOnboarding' -NotePropertyValue $true -Force;$j|ConvertTo-Json|Set-Content $f"jq '. + {"hasCompletedOnboarding": true}' ~/.claude.json > /tmp/tmp.json && mv /tmp/tmp.json ~/.claude.json
# If jq is not found, install it first: on macOS use brew install jqRestart claude afterward. Also confirm that ANTHROPIC_BASE_URL in settings.json points to https://tian-shu.org and the token is correct (see Claude Code Manual Setup).
Using Tianshu in the Claude Code VSCode extension
First make sure the command-line Claude Code is configured and chats normally. Then:
Press Win + R and open the directory: %userprofile%\.claude
If there's no config.json, create one manuallyIn Finder press Command + Shift + G and open: ~/.claude
If there's no config.json, create one manuallyWrite the following into config.json (pointing to the same environment you configured for Tianshu):
{
"primaryApiKey": "your Tianshu token"
}Save and restart VSCode.
Switch back to 200K context / disable non-essential traffic
The Tianshu manual setup guide already adds this to settings.json:
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"It turns off some non-essential background traffic. If you need finer behavior such as pinning the context window, adjust it yourself per Claude Code's official environment variables.
The claude-cconly group can't be used in third-party clients
The claude-cconly group supports Claude Code connections only and can't be used with third-party clients like Cherry Studio or Cline. To use Claude in third-party clients, switch to the claude-max / claude-kiro group. See Token Groups for details.
Still have questions?
For general and billing questions, see General & Billing, or contact our support email [email protected].
