[BUG] VS Code extension in Codespaces fails Bedrock auth with "Could not load credentials from any providers" while same Claude binary works from shell
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?
Summary
In GitHub Codespaces, Claude Code fails to use AWS Bedrock credentials when prompts are sent through the VS Code extension UI.
The same bundled claude binary works correctly when launched manually from the shell in the same Codespace.
The failure only happens on the VS Code extension path (cc_entrypoint=claude-vscode), while the CLI path (cc_entrypoint=cli) succeeds.
What Should Happen?
The VS Code extension should be able to use the same AWS Bedrock credentials that are already visible to the Claude process it launches, and prompts should succeed just like they do from CLI.
Error Messages/Logs
Prompts sent through the VS Code extension fail with:
API error (attempt N/11): Could not load credentials from any providers
Steps to Reproduce
- Open a GitHub Codespace.
- Configure AWS Bedrock credentials in the Codespace/container environment.
- Install and open the Claude Code VS Code extension.
- Send a prompt through the extension UI, for example:
say hello
- Observe repeated failures:
API error (attempt 1/11): Could not load credentials from any providers
- In the same Codespace, launch the bundled Claude binary manually from the shell:
/home/codespace/.vscode-remote/extensions/anthropic.claude-code-2.1.114-linux-x64/resources/native-binary/claude \
--output-format stream-json \
--verbose \
--input-format stream-json \
--max-thinking-tokens 31999 \
--permission-prompt-tool stdio \
--setting-sources=user,project,local \
--permission-mode default \
--debug \
--debug-to-stderr \
--enable-auth-status \
--no-chrome \
--replay-user-messages
- Send a prompt through that CLI session.
- Observe that the request succeeds.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.114 (Claude Code)
Platform
AWS Bedrock
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Key difference seen in logs
Working path
The working run is tagged as:
cc_entrypoint=cli
It successfully reaches Bedrock:
[API REQUEST] /model/us.anthropic.claude-sonnet-4-6/invoke-with-response-stream source=repl_main_thread
[DEBUG] Stream started - received first chunk
Failing path
The failing extension run is tagged as:
cc_entrypoint=claude-vscode
And then fails with:
[ERROR] API error (attempt 1/11): Could not load credentials from any providers
Failing VS Code extension log excerpt
2026-04-20 11:29:42.056 [info] From claude: 2026-04-20T11:29:42.056Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.114.5ad; cc_entrypoint=claude-vscode;
2026-04-20 11:29:42.057 [info] From claude: 2026-04-20T11:29:42.057Z [DEBUG] [API:request] Creating client, ANTHROPIC_CUSTOM_HEADERS present: false, has Authorization header: false
2026-04-20T11:29:42.057Z [DEBUG] [API:auth] OAuth token check starting
2026-04-20 11:29:42.058 [info] From claude: 2026-04-20T11:29:42.058Z [DEBUG] [API:auth] OAuth token check complete
2026-04-20 11:29:42.070 [info] From claude: 2026-04-20T11:29:42.069Z [ERROR] API error (attempt 1/11): Could not load credentials from any providers
Working CLI log excerpt
2026-04-20T11:32:36.533Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.114.5ad; cc_entrypoint=cli;
2026-04-20T11:32:36.567Z [DEBUG] [API REQUEST] /model/us.anthropic.claude-sonnet-4-6/invoke-with-response-stream source=repl_main_thread
2026-04-20T11:32:38.419Z [DEBUG] Stream started - received first chunk
Why this looks extension-specific
- Same Codespace
- Same container
- Same AWS credentials
- Same bundled Claude binary
- Same Bedrock target
- CLI works
- VS Code extension path fails
That suggests a bug or auth/provider-chain mismatch specific to the claude-vscode entrypoint rather than a general AWS or Bedrock configuration issue.
Related issues
Possibly related in symptom/auth area, but not the same issue:
anthropics/claude-code-action#1090anthropics/claude-code#29765
Additional notes
I can provide fuller logs if helpful, but the main repro is reliable:
- VS Code extension UI fails
- manual CLI launch succeeds
- spawned extension
claudeprocess already sees the AWS credentials
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗