[BUG] Freshly installed Claude Code ignores settings.json

Status Open
Reported on v2.0.74
Maintainer reply None cached
Activity 13 comments · opened Dec 12, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

This breaks new users in a corporate environment behind a proxy (ex: LiteLLM).

Maybe related to #13663

If you're initially installing 2.0.65 or later without having ever run a previous version (so no ~/.claude.json exists), the first run of claude doesn't pick up the environment variables from settings.json. My ~/.claude/settings.json is configured with ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN pointing at a LiteLLM instance. On a "fresh install" these settings are ignored on initial run, resulting in the prompt to "Select login method":

Claude Code can be used with your Claude subscription or billed based on API usage through your Console account.

 Select login method:

 ❯ 1. Claude account with subscription · Pro, Max, Team, or Enterprise

   2. Anthropic Console account · API usage billing

What Should Happen?

With ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN set in ~/.claude/settings.json, the initial run of claude should skip the prompt for the login method.

Error Messages/Logs

Steps to Reproduce

Keep a backup of your .claude.json and restore it later.
cp ~/.claude.json ~/.claude.json.keep

  1. rm ~/.claude.json
  2. install specific version
  3. run claude

broken = prompts for theme setup (expected) and login method (doesn't use settings.json)
works = prompts for theme setup, shows security note, and asks "Do you trust the files in this folder"

Results:
2.0.75 broken
2.0.74 broken
2.0.73 broken
2.0.72 broken
2.0.71 broken
2.0.67 broken
2.0.66 broken
2.0.65 broken
2.0.64 works
2.0.63 Does Not Exist
2.0.62 works
2.0.56 works

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.64

Claude Code Version

2.0.75 (Claude Code)

Platform

AWS Bedrock

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

I found 2 workarounds:
a) roll back to a previous version (2.0.64 or earlier), run claude through the configuration prompts (~/.claude.json now exists), run claude update to get the latest version. Latest version now works.
b) temporarily set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in the shell and a fresh install and first run of 2.0.67 works.

Maybe related: The claude update process wants to stop on 2.0.65. Prior versions upgrade to 2.0.65 and another upgrade run is required to upgrade 2.0.65 to latest (2.0.67).

Edited to add:

  • cvbnt provided a third workaround which I confirmed works for me: edit ~/.claude.json, set “hasCompletedOnboarding”: true, claude skips login
  • up to 2.0.75 is also still broken

View original on GitHub ↗

13 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/13663
  2. https://github.com/anthropics/claude-code/issues/4714
  3. https://github.com/anthropics/claude-code/issues/13770

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

cvbnt · 8 months ago

edit .claude.json,“hasCompletedOnboarding”: true,It can skip login

cjpeterein · 8 months ago
edit .claude.json,“hasCompletedOnboarding”: true,It can skip login

Confirmed. This is another workaround.

jasonchen-JL · 7 months ago
edit .claude.json,“hasCompletedOnboarding”: true,It can skip login

why isn't it working when I edit the .claude.json file and set "hasCompletedOnboarding": true? Could you please take a look? I put this parameter as the first entry in the file.
{
"hasCompletedOnboarding": true,
"installMethod": "unknown",
"autoUpdates": true,
"cachedStatsigGates": {
"tengu_prompt_suggestion": true,
"tengu_vscode_review_upsell": false,
"tengu_year_end_2025_campaign_promo": false,
"tengu_log_1p_events": true,
"tengu_disable_bypass_permissions_mode": false,
"code_slack_app_install_banner": false,
"tengu_tool_pear": false,
"tengu_web_tasks": true
},
"cachedDynamicConfigs": {
"tengu_1p_event_batch_config": {
"scheduledDelayMillis": 5000,
"maxExportBatchSize": 200,
"maxQueueSize": 8192
}
},
"cachedGrowthBookFeatures": {
"tengu_mcp_tool_search": false,
"tengu_disable_bypass_permissions_mode": false,
"strawberry_granite_flag": "N/A",
"persimmon_marble_flag": "N/A",
"tengu_tool_pear": false,
"tengu_thinkback": false,
"tengu_ant_attribution_header_new": false
},
"userID": "8a747ab56e72c514ca636a69c2b9b9bd6d40ff1a6de5cd17bbc2e48d55164092",
"firstStartTime": "2026-01-06T08:05:26.542Z",
"sonnet45MigrationComplete": true,
"opus45MigrationComplete": true,
"thinkingMigrationComplete": true
}

jaytarr-geo · 7 months ago

Workaround that worked for me is to use "apiKeyHelper" instead, placed outside the env key at the root level of the settings file.

In settings.json, replace:

{
  "env": {
    "ANTHROPIC_BASE_URL": "YOUR_BASE_URL",
    "ANTHROPIC_API_KEY": "YOUR_TOKEN"
  }
}

With:

{
  "apiKeyHelper": "echo 'YOUR_TOKEN'",
  "env": {
    "ANTHROPIC_BASE_URL": "YOUR_BASE_URL"
  }
}
qspark-eliezerlp · 7 months ago

Another workaround is to (temporarily) export the ANTHROPIC_API_KEY for the first run of claude.

lirc572 · 7 months ago

Same here. With the latest version freshly installed, I tried all methods above and still can't skip login...

I really don't want to copy over the auto-generated gibberish files from other machines although that should work in theory...

fghamsary · 6 months ago
Another workaround is to (temporarily) export the ANTHROPIC_API_KEY for the first run of claude.

This solution is the best for now, and it is working fine for me.

fghamsary · 6 months ago
Workaround that worked for me is to use "apiKeyHelper" instead, placed outside the env key at the root level of the settings file. In settings.json, replace: `` { "env": { "ANTHROPIC_BASE_URL": "YOUR_BASE_URL", "ANTHROPIC_API_KEY": "YOUR_TOKEN" } } ` With: ` { "apiKeyHelper": "echo 'YOUR_TOKEN'", "env": { "ANTHROPIC_BASE_URL": "YOUR_BASE_URL" } } ``

This is another solution that worked fine for me as well.

charphob · 6 months ago

Happens in v2.1.39

edit .claude.json,“hasCompletedOnboarding”: true,It can skip login

Easiest solution for this annoying problem.

327344674 · 4 months ago
edit .claude.json,“hasCompletedOnboarding”: true,It can skip login

It doesn't work, still asking for login.

327344674 · 4 months ago
> Workaround that worked for me is to use "apiKeyHelper" instead, placed outside the env key at the root level of the settings file. > In settings.json, replace: > `` > { > "env": { > "ANTHROPIC_BASE_URL": "YOUR_BASE_URL", > "ANTHROPIC_API_KEY": "YOUR_TOKEN" > } > } > ` > > > > > > > > > > > > With: > ` > { > "apiKeyHelper": "echo 'YOUR_TOKEN'", > "env": { > "ANTHROPIC_BASE_URL": "YOUR_BASE_URL" > } > } > `` This is another solution that worked fine for me as well.

It doesn't work for me either.

### Preflight Checklist [x] I have searched existing issues and this hasn't been reported yet[x] This is a single bug report (please file separate reports for different bugs)[x] I am using the latest version of Claude Code ### What's Wrong? This breaks new users in a corporate environment behind a proxy (ex: LiteLLM). Maybe related to #13663 If you're initially installing 2.0.65 or later without having ever run a previous version (so no ~/.claude.json exists), the first run of claude doesn't pick up the environment variables from settings.json. My ~/.claude/settings.json is configured with ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN pointing at a LiteLLM instance. On a "fresh install" these settings are ignored on initial run, resulting in the prompt to "Select login method": `` Claude Code can be used with your Claude subscription or billed based on API usage through your Console account. Select login method: ❯ 1. Claude account with subscription · Pro, Max, Team, or Enterprise 2. Anthropic Console account · API usage billing ` ### What Should Happen? With ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN set in ~/.claude/settings.json, the initial run of claude should skip the prompt for the login method. ### Error Messages/Logs ### Steps to Reproduce Keep a backup of your .claude.json and restore it later. cp ~/.claude.json ~/.claude.json.keep 1. rm ~/.claude.json 2. install specific version 3. run claude broken = prompts for theme setup (expected) and login method (doesn't use settings.json) works = prompts for theme setup, shows security note, and asks "Do you trust the files in this folder" Results: 2.0.75 broken 2.0.74 broken 2.0.73 broken 2.0.72 broken 2.0.71 broken 2.0.67 broken 2.0.66 broken 2.0.65 broken 2.0.64 works 2.0.63 Does Not Exist 2.0.62 works 2.0.56 works ### Claude Model Sonnet (default) ### Is this a regression? Yes, this worked in a previous version ### Last Working Version 2.0.64 ### Claude Code Version 2.0.75 (Claude Code) ### Platform AWS Bedrock ### Operating System Ubuntu/Debian Linux ### Terminal/Shell Other ### Additional Information I found 2 workarounds: a) roll back to a previous version (2.0.64 or earlier), run claude through the configuration prompts (~/.claude.json now exists), run claude update to get the latest version. Latest version now works. b) temporarily set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in the shell and a fresh install and first run of 2.0.67 works. Maybe related: The claude update` process wants to stop on 2.0.65. Prior versions upgrade to 2.0.65 and another upgrade run is required to upgrade 2.0.65 to latest (2.0.67). Edited to add: cvbnt provided a third workaround which I confirmed works for me: edit ~/.claude.json, set “hasCompletedOnboarding”: true, claude skips login * up to 2.0.75 is also still broken

回滚的方法是对我唯一奏效的。其它方案都不行。
This the only way for me can work.

lmaier-exocad · 2 months ago

Tried the suggestions, but my \.claude does not contain a .claude.json, only .claude.json.backup.XXXX. And my settings.json does only list
{
"autoUpdatesChannel": "latest",
"theme": "dark"
}