I installed Claude Code and tried to make it work with AWS Bedrock. Somehow, it didnβt. And now it is stuck is stuck to it. I can break it to change provider. Unistalled, removed from the user profile, tried every trick known to me. Can someone help how to break the connection? Im on Win 11.
I think this is probably not a browser cache issue or a bad install.
One thing that catches a lot of people is that Claude Code stores its configuration outside of the executable. Uninstalling it doesnβt necessarily remove the configuration or Windows environment variables that tell it to use Bedrock.
Iβd try these steps before reinstalling again.
1. Log out first
Inside Claude Code run:
/logout
Completely close Claude Code afterwards and launch it again.
Sometimes that alone resets the provider selection wizard.
2. Check whether Bedrock is being forced by an environment variable
Open PowerShell and run:
Write-Host "Claude config directory: $env:CLAUDE_CONFIG_DIR"
Get-ChildItem Env: |
Where-Object {
$_.Name -match 'CLAUDE|ANTHROPIC|AWS|BEDROCK'
} |
Sort-Object Name
Look specifically for variables like:
CLAUDE_CODE_USE_BEDROCK
CLAUDE_CONFIG_DIR
AWS_PROFILE
AWS_REGION
AWS_DEFAULT_REGION
AWS_BEARER_TOKEN_BEDROCK
If CLAUDE_CODE_USE_BEDROCK is set, thatβs a strong clue as to why it keeps launching into Bedrock mode.
3. Inspect Claudeβs settings
Run:
$settings = if ($env:CLAUDE_CONFIG_DIR) {
Join-Path $env:CLAUDE_CONFIG_DIR "settings.json"
} else {
Join-Path $HOME ".claude\settings.json"
}
Write-Host "Settings file:"
Write-Host $settings
if (Test-Path $settings) {
Get-Content $settings
}
If you see Bedrock-related settings in the env section, remove only those entries and save the file.
4. Safe reset (recommended)
Instead of deleting everything, rename the configuration folder.
That preserves your chats and settings if you need them later.
Get-Process claude -ErrorAction SilentlyContinue |
Stop-Process -Force
$claudeDir = if ($env:CLAUDE_CONFIG_DIR) {
$env:CLAUDE_CONFIG_DIR
} else {
Join-Path $HOME ".claude"
}
if (Test-Path $claudeDir) {
$backup = "$claudeDir.backup-$(Get-Date -Format 'yyyyMMdd-HHmmss')"
Move-Item $claudeDir $backup
Write-Host "Backed up to:"
Write-Host $backup
}
claude
Claude Code should now recreate a brand new configuration directory.
5. Check User and Machine environment variables
Sometimes Windows stores the variable permanently.
foreach ($scope in 'User','Machine') {
Write-Host "`n=== $scope variables ==="
[Environment]::GetEnvironmentVariables($scope).GetEnumerator() |
Where-Object {
$_.Key -match 'CLAUDE|ANTHROPIC|AWS|BEDROCK'
} |
Sort-Object Key |
Format-Table Key,Value -AutoSize
}
If you find:
CLAUDE_CODE_USE_BEDROCK
Remove it from the User scope:
[Environment]::SetEnvironmentVariable(
"CLAUDE_CODE_USE_BEDROCK",
$null,
"User"
)
Then close every PowerShell, Command Prompt, VS Code, and Claude window before launching Claude again.
My guess
If I had to bet, Iβd say one of these is happening:
- The Bedrock configuration is still in
settings.json CLAUDE_CODE_USE_BEDROCKis still set- Claude never actually reset its configuration after uninstalling
If you post:
- the output of the environment-variable command, and
- the contents of the
settings.jsonfile (with any secrets removed),
Iβm happy to help narrow it down.
@BCBC pointed the right direction β hereβs why it wonβt die, in one picture.
Uninstalling removed the app, not the setting. Claude Code decides its provider by climbing a ladder of settings, and whichever rung is highest wins. Your Bedrock flag is stuck near the top β above your API key, above /login. Everything you kept re-trying lives at the bottom, so it never had a chance:
WHO WINS? (higher rung beats every rung below it)
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β company-policy file / Windows registry policy β survives uninstall
β‘ CLAUDE_CODE_USE_BEDROCK (a saved setting) βββ IT'S HIDING HERE
β’ project folder's .claude\settings.json
β£ your settings.json β the file to edit β
β€ /login , reinstalling β what you kept doing β loses every time
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
(A βsettingβ here just means a line saved in a file or in Windows β separate from the program, which is why removing the program leaves it behind.) The /setup-bedrock wizard wrote that flag into your settings.json, and /logout is switched off while Bedrock is active β thatβs why signing out did nothing.
βββββββββββββββββββββββββ
β Fix it in one edit
You canβt delete rung β‘, but you can overrule it from rung β£. Open %USERPROFILE%\.claude\settings.json and set the flag to empty β Claude reads "" as βoff,β and this beats the system setting even if something keeps re-adding it:
{
"env": {
"CLAUDE_CODE_USE_BEDROCK": "",
"AWS_PROFILE": "",
"AWS_REGION": "",
"ANTHROPIC_MODEL": ""
}
}
Save β fully close Claude Code β reopen β /login. That clears it for most people. ![]()
Want to test it before touching files? Boot once with the flag forced off:
claude --settings '{"env":{"CLAUDE_CODE_USE_BEDROCK":""}}'
Boots off Bedrock β that flag was the whole problem.
βββββββββββββββββββββββββ
Still on Bedrock? Make it point at the guilty rung
/status
Prints the live provider and which setting-sources are active β API provider: Amazon Bedrock means a rung is still forcing it. (Skip claude doctor for now β it freezes on Bedrock, and that freeze is the confirmation.)
Then corner it β launch from an empty settings folder with no project around:
$env:CLAUDE_CONFIG_DIR="$env:TEMP\cc-clean"; cd $env:TEMP; claude
ββ
Bedrock gone here β the culprit was one of your files (rungs β’ββ£). Done.
ββ
Still Bedrock here β itβs a top rung (β ): a company-policy file, a registry policy, or a machine-wide Windows setting β open the drawers below.
ποΈ The top rungs β company-policy & registry (survive uninstall, exact paths)
ββ
Policy file β C:\Program Files\ClaudeCode\managed-settings.json (+ its managed-settings.d\ folder). Heads-up: the old C:\ProgramData\... spot was dropped in v2.1.75 β ignore guides pointing there
ββ
Registry policy β run regedit β check HKLM\SOFTWARE\Policies\ClaudeCode and HKCU\SOFTWARE\Policies\ClaudeCode β delete the Settings value if its text mentions Bedrock
ββ
Org-pushed cache β %USERPROFILE%\.claude\remote-settings.json β a rung that even beats command-line flags and comes back after reinstall
ββ
Saved login β %USERPROFILE%\.claude\.credentials.json holds the Bedrock auth β delete it
π Why it keeps coming BACK β the re-adders on every launch
Something re-writes the flag each time you open Claude. Track it down:
ββ
See the real setting a running Claude got (not what you think is set) β Process Explorer β right-click claude.exe β Properties β Environment tab
ββ
A clean GUI to remove Windows settings β PowerToys Environment Variables (run as admin to reach system-wide ones)
ββ
Remove it properly β $null does NOT delete it, use ''; plain setx "" leaves it in the registry:
[Environment]::SetEnvironmentVariable('CLAUDE_CODE_USE_BEDROCK','','User')
reg delete "HKCU\Environment" /v CLAUDE_CODE_USE_BEDROCK /f
ββ
Your PowerShell startup file β open $PROFILE, delete any line setting CLAUDE_CODE_USE_BEDROCK
ββ
Auto-refreshers inside settings.json β search it for awsAuthRefresh, awsCredentialExport, apiKeyHelper β these re-run AWS login and yank you back. Delete them
ββ
VS Code keeps its own copy β check claudeCode.environmentVariables in VS Codeβs settings (the extension reads it before your .claude)
ββ
AWS leftovers β clean the failed profile from %USERPROFILE%\.aws\config + credentials; and clear Bedrock model names (us.anthropic.*) or youβll hit errors that look identical
𧨠Full clean reinstall β the part people miss
A wipe fails because the VS Code extension, JetBrains plugin, and Desktop app each rebuild ~/.claude β remove those first, then:
where.exe claude # two results = a leftover second copy
winget uninstall Anthropic.ClaudeCode
npm uninstall -g @anthropic-ai/claude-code
Remove-Item "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item "$env:USERPROFILE\.claude.json" -Force
irm https://claude.ai/install.ps1 | iex
π Or don't fight it β send Claude Code to a different backend
ββ
Back to normal β clear the flag (above), set ANTHROPIC_API_KEY, /login
ββ
A different provider entirely β route it through ANTHROPIC_BASE_URL via LiteLLM or claude-code-router (OpenRouter / Groq / local) β a fresh backend instead of a half-set-up Bedrock
βββββββββββββββββββββββββ
You canβt uninstall a setting β a top-rung flag shrugs off every reinstall until you outrank it in its own file.

!