[BUG] awsAuthRefresh does not display device verification code (re-filed from confirmed #82426)

Status Open
Reported on v2.1.285
Maintainer reply None cached
Activity 1 comment · opened Oct 1, 2026

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 awsAuthRefresh triggers aws sso login, the device verification code is not displayed in the Claude Code terminal. The browser opens for device authorisation, but the user cannot verify the code matches because nothing is shown in the console until after the auth flow completes.

This was previously reported as #82426, which was confirmed and reproduced by a maintainer (labelled reproduced) on 2026-08-19, then auto-closed as stale on 2026-09-22 without any fix or human review. Re-filing as requested by the stale bot.

What Should Happen?

The verification code should be displayed in the terminal before the browser opens, so the user can confirm it matches the code shown in the browser's authorisation page.

Error Messages/Logs

Steps to Reproduce

  1. Configure awsAuthRefresh in ~/.claude/settings.json:

"awsAuthRefresh": "aws sso login --profile <profile>"

  1. Let the SSO session expire (or start a fresh day)
  2. Launch Claude Code — the browser opens for device auth but no verification code is shown in the terminal

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.285

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Prior Reproduction

From #82426 maintainer comment:

Confirmed / reproduced on 2.1.235 (Linux, Bedrock mode): with awsAuthRefresh set to a command that prints the SSO device URL + verification code and then waits ~25s (simulating aws sso login waiting for the browser), and a profile whose SSO token is missing/expired so the refresh runs at launch, the terminal stays completely blank for the entire time the refresh command is running — none of its output is shown while it waits. Only after the command exits does the UI render, and the "Authentication" box containing the URL and code appears after the fact, when it is no longer useful.

Claude Code Version

2.1.285 (originally reported on 2.1.212, reproduced on 2.1.235)

Additional Information

  • Original issue: #82426 (labels: bug, reproduced, api:bedrock, platform:macos, area:auth)
  • The original was auto-closed by the stale bot, not by a human — the bug was never addressed
  • Still present as of 2.1.285 — confirmed failing daily across every version from 2.1.212 through 2.1.285

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗