claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] `"awsAuthRefresh":` setting causes constant repeated auth attempts

Open timfallmk opened this issue 2 months ago • 9 comments

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?

When opening Claude, if an AWS token refresh command is present in ~/.claude/settings.json at "awsAuthRefresh", claude will loop asking for a new auth token (and prompting a browser open) every few seconds. Passing the login challenge (or denying it) does not stop the loop.

A user cannot get past this point.

Example ~/.claude/settings.json snippet:

{
   "awsAuthRefresh": "aws sso login --profile <profile>",
   "env": {
     "AWS_PROFILE": "<profile>",
     "AWS_REGION": "us-west-2",
     "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "16384",
     "CLAUDE_CODE_USE_BEDROCK": "1",
     "DISABLE_AUTOUPDATER": "1"
   },

What Should Happen?

Claude should successful launch, check if the current auth token is valid and run auth once if necessary to get a valid token. It should then be ready to accept messages after that.

Error Messages/Logs


Steps to Reproduce

  1. Set an "awsAuthRefresh": command in ~/.claude/settings.json
  2. Launch Claude Code

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.52

Claude Code Version

2.0.53

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

This regression appears to have been introduced in 2.0.53. It does not happen prior to this version. Note: This is possibly related to #10594

timfallmk avatar Nov 26 '25 01:11 timfallmk

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9027
  2. https://github.com/anthropics/claude-code/issues/10594
  3. https://github.com/anthropics/claude-code/issues/9473

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

github-actions[bot] avatar Nov 26 '25 01:11 github-actions[bot]

Possible regression of #9027 although possibly unrelated.

timfallmk avatar Nov 26 '25 01:11 timfallmk

This appears to be fixed in 2.0.56

timfallmk avatar Dec 02 '25 23:12 timfallmk

Reopening as it was not fixed in 2.0.56

timfallmk avatar Dec 03 '25 21:12 timfallmk

Is there a fix or workaround for this???

jhigginbottom avatar Dec 16 '25 17:12 jhigginbottom

Still happening on 2.0.76. Is there any solution for this?

sagarrth avatar Dec 30 '25 10:12 sagarrth

Hate to be a "me too", but this is breaking the flow for dozens of people here at my org.

MWatter avatar Jan 06 '26 23:01 MWatter