[BUG] `"awsAuthRefresh":` setting causes constant repeated auth attempts
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
- Set an
"awsAuthRefresh":command in~/.claude/settings.json - 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
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/9027
- https://github.com/anthropics/claude-code/issues/10594
- 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
Possible regression of #9027 although possibly unrelated.
This appears to be fixed in 2.0.56
Reopening as it was not fixed in 2.0.56
Is there a fix or workaround for this???
Still happening on 2.0.76. Is there any solution for this?
Hate to be a "me too", but this is breaking the flow for dozens of people here at my org.