[BUG] VSCode extension 2.0.0 doesn't allow using Bedrock token

Resolved 💬 17 comments Opened Sep 29, 2025 by justanotheranonymoususer Closed Sep 30, 2025
💡 Likely answer: A maintainer (hackyon-anthropic, collaborator) responded on this thread — see the highlighted reply below.

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?

After updating to 2.0.0, the extension asks me to login by selecting one of two methods, neither of which apply to me. I have a Bedrock token which worked fine before the update. Is there a workaround to make it work?

What Should Happen?

Work as before.

Error Messages/Logs

Steps to Reproduce

  • Open Claude via the button in VSCode.
  • Be stuck without a way to login.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.x

Claude Code Version

Not relevant

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

17 Comments

kburkhardt2 · 9 months ago

I am seeing this as well on my Mac - it opens the standard AWS SSO but any chat gets stuck:

<img width="797" height="149" alt="Image" src="https://github.com/user-attachments/assets/252c492c-dba0-4876-8bc0-45b155a601c4" />

alirussell · 9 months ago

Also getting the same JSON error

<img width="1508" height="422" alt="Image" src="https://github.com/user-attachments/assets/87f62db2-92d6-4d98-bf65-4f9610d6f129" />

justanotheranonymoususer · 9 months ago

Well I don't see this token error. I just can't login, I want to use the token but it asks to login.

K3UL · 9 months ago

On a related note, it does not seem to respect the settings.json completely. It does detect the model I set there, but it does not seem to use Bedrock even though my file contains "CLAUDE_CODE_USE_BEDROCK": "1". I also don't think it is executing the script in awsCredentialExport.

These are working good with Claude Code from the terminal, on the same machine with the same settings.

alexef · 9 months ago

Have the same issue, unable to login. Tried setting up the environment variables in VSCode settings, didn't work either:

"claude-code.environmentVariables": [
    "CLAUDE_CODE_USE_BEDROCK=1",
  ]

Works well in terminal, just the extension wants either Anthropic or Claude subscription.

<img width="643" height="558" alt="Image" src="https://github.com/user-attachments/assets/10a34834-3ace-483d-a21f-724e89759f2c" />

vuon9 · 9 months ago

It's broken.

{
    "claude-code.selectedModel": "arn:aws:bedrock:eu-west-1:[censored]:inference-profile/global.anthropic.claude-sonnet-4-5-20250929-v1:0",
    "claude-code.environmentVariables": [
        {
            "name": "CLAUDE_CODE_USE_BEDROCK",
            "value": "1"
        },
    ],
}

Find your arn here:

aws bedrock list-inference-profiles

This one works for me, I'm using Bedrock with profile login. It seems the extension doesn't respect the CLAUDE_CODE_USE_BEDROCK env var from ~/.claude/settings.json

vuon9 · 9 months ago
Also getting the same JSON error <img alt="Image" width="1508" height="422" src="https://private-user-images.githubusercontent.com/643153/495349643-87f62db2-92d6-4d98-bf65-4f9610d6f129.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTkyMjUyMzYsIm5iZiI6MTc1OTIyNDkzNiwicGF0aCI6Ii82NDMxNTMvNDk1MzQ5NjQzLTg3ZjYyZGIyLTkyZDYtNGQ5OC1iZjY1LTRmOTYxMGQ2ZjEyOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwOTMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDkzMFQwOTM1MzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mOGQ0NWQxNDg2MjIyN2IxNTU5NTc3MGZlYTk3YTExNjNjNTZkZGYzOGZjNGNiZGZlMzA5ZWMwYjlhNWQ3ZjhhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.tOC9-AzJjY8aslxsKyju3Z-6CsL58Q4c8tg2Ps9dxIs">

I got the same error when I have "awsAuthRefresh" command, but disabling it then I manually login and it could work.

alexef · 9 months ago

@vuon9 you are a genius, thank you, confirmed it works for me!

hackyon-anthropic collaborator · 9 months ago

Thanks for the reports (and the excellent investigation, @vuon9!) !

We've added documentation on how to use the new native VSCode extension with vertex and bedrock (and we're working on linking to it from the login page as well):
https://docs.claude.com/en/docs/claude-code/vs-code#using-third-party-providers-vertex-and-bedrock

K3UL · 9 months ago

@hackyon-anthropic thank you for the update.
So it is only environment variables ? awsCredentialExport and awsAuthRefresh are not supported ? In my company we need this refresh script because we have some additional authentication to take care of

deepnz · 9 months ago

Think it could be that the anthropic_small_fast_model using Haiku for the auth refresh is not supported in the extension if people are still using that. It still works in the CLI, but the docs recommend using the anthropic_default_haiku_model env var as the small_fast_model is deprecated. If you use the anthropic_default_haiku_model var, the extension and awsAuthRefresh works . Check https://docs.claude.com/en/docs/claude-code/model-config#environment-variables

vuon9 · 9 months ago
Think it could be that the anthropic_small_fast_model using Haiku for the auth refresh is not supported in the extension if people are still using that. It still works in the CLI, but the docs recommend using the anthropic_default_haiku_model env var as the small_fast_model is deprecated. If you use the anthropic_default_haiku_model var, the extension and awsAuthRefresh works . Check https://docs.claude.com/en/docs/claude-code/model-config#environment-variables

I just tested, and it doesn't work like that. Still forces me to login.

<img width="1905" height="339" alt="Image" src="https://github.com/user-attachments/assets/6157cea6-66a4-461a-aafb-e65356f1f15f" />

Here's a part of log output

2025-10-01 11:11:54.357 [info] Received message from webview: {"type":"request","requestId":"xxx","request":{"type":"rename_tab","title":"hey?"}}
2025-10-01 11:11:54.364 [info] Received message from webview: {"type":"io_message","channelId":"xxx","message":{"type":"user","session_id":"","parent_tool_use_id":null,"message":{"role":"user","content":[{"type":"text","text":"hey?"}]}},"done":false}
2025-10-01 11:11:54.388 [info] Received message from webview: {"type":"request","requestId":"xxx","request":{"type":"rename_tab","title":"hey?"}}
2025-10-01 11:11:54.412 [info] Closing Claude on channel: xxx
2025-10-01 11:11:54.412 [error] Error from Claude (on channel xxx): SyntaxError: Unexpected token 'A', "Attempting"... is not valid JSON
deepnz · 9 months ago

what if you remove both the SMALL_FAST_MODEL and the SMALL_FAST_MODEL_AWS_REGION entirely, and just keep the Haiku? Because that works for me when I just have the DEFAULT_HAIKU_MODEL, DEFAULT_SONNET_MODEL, and DEFAULT_OPUS_MODEL. And when i add the SMALL_FAST_MODEL it gives me that error.
[edit: scratch that, i thought i reproduced the error by adding small_fast model var but wasnt that. I was able to get it to work with those default model vars and with the awsAuthRefresh.]

deepnz · 9 months ago

Ok was able to narrow it further with that. I tried removing the default_sonnet var and just kept the default_haiku but it was hanging after hitting the prompt, while not showing that error. It does retrieve the aws credentials successfully. But works once i added both, so my guess is it needs a default haiku and sonnet at the least in your .claude/settings.json if you don't specify it in your vscode settings

> Think it could be that the anthropic_small_fast_model using Haiku for the auth refresh is not supported in the extension if people are still using that. It still works in the CLI, but the docs recommend using the anthropic_default_haiku_model env var as the small_fast_model is deprecated. If you use the anthropic_default_haiku_model var, the extension and awsAuthRefresh works . Check https://docs.claude.com/en/docs/claude-code/model-config#environment-variables I just tested, and it doesn't work like that. Still forces me to login. <img alt="Image" width="1905" height="339" src="https://private-user-images.githubusercontent.com/3168632/495987214-6157cea6-66a4-461a-aafb-e65356f1f15f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTkzMTA2OTgsIm5iZiI6MTc1OTMxMDM5OCwicGF0aCI6Ii8zMTY4NjMyLzQ5NTk4NzIxNC02MTU3Y2VhNi02NmE0LTQ2MWEtYWFmYi1lNjUzNTZmMWYxNWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MTAwMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTEwMDFUMDkxOTU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTgyOWYwMzA5ZjdlMDlmYzk1NzhiZmUwNDZjNjMyMDRiMGFmYThkNTE0OTIwYjdhMjI2OWExOGI3MTk0NzMxMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.K4cOhO5ZLowZhLhZvx0dkTQ3AHZYKkDT9pu-oHiLAmQ"> Here's a part of log output `` 2025-10-01 11:11:54.357 [info] Received message from webview: {"type":"request","requestId":"xxx","request":{"type":"rename_tab","title":"hey?"}} 2025-10-01 11:11:54.364 [info] Received message from webview: {"type":"io_message","channelId":"xxx","message":{"type":"user","session_id":"","parent_tool_use_id":null,"message":{"role":"user","content":[{"type":"text","text":"hey?"}]}},"done":false} 2025-10-01 11:11:54.388 [info] Received message from webview: {"type":"request","requestId":"xxx","request":{"type":"rename_tab","title":"hey?"}} 2025-10-01 11:11:54.412 [info] Closing Claude on channel: xxx 2025-10-01 11:11:54.412 [error] Error from Claude (on channel xxx): SyntaxError: Unexpected token 'A', "Attempting"... is not valid JSON ``
yhan1-godaddy · 9 months ago

@hackyon-anthropic

There is an issue where the extension ignores ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN and force you to either login or use API (not using Bedrock or Vertex). But this does not happen when using CC CLI.

e.g. this runs fine:

``ANTHROPIC_BASE_URL=my_url ANTHROPIC_AUTH_TOKEN=my_token npx @anthropic-ai/claude-code@latest``

But setting those in the shell env and/or extension env claude-code.environmentVariables does not work.

darealbib · 9 months ago

The extension asks me to log in through Claude or Anthropic. It works via terminal.

Is this going to be fixed? @hackyon-anthropic

<img width="576" height="184" alt="Image" src="https://github.com/user-attachments/assets/314282e4-9218-4f47-bc6e-589c45df6e57" />
<img width="672" height="787" alt="Image" src="https://github.com/user-attachments/assets/cf824919-31ec-4b2d-a207-e5b85281e6e0" />

github-actions[bot] · 9 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.