[BUG] Failed awsAuthRefresh output shown even after auth succeeds
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?
My awsAuthRefresh command failed, causing an error message to appear. I addressed the cause of the auth error and submitted another prompt, which succeeded, indicating successful auth refresh. However, the error from the failed auth refresh is still shown, and it's sticky-positioned below the conversation.
This screenshot captures the issue: The agent output is shown above the auth error message, even though the auth error was resolved. I can continue the conversation, but it continues _above_ the no-longer-applicable auth error message.
<img width="1014" height="419" alt="Image" src="https://github.com/user-attachments/assets/23f2f195-10f3-479a-ab40-729d92827ff9" />
What Should Happen?
After awsAuthRefresh succeeds, the auth error message should either 1) be dismissed or 2) be positioned at the point in the conversation where auth failed, instead of being stuck to the tail of the conversation.
Error Messages/Logs
Steps to Reproduce
- In
~/.claude/settings.json, setawsAuthRefreshto a valid AWS auth command that lets you control its exit code. Have it return exit code 0 initially. - Start a session with Claude Code and enter a prompt.
- Set the AWS auth command to return exit code 1, then enter another prompt, triggering the auth error.
- Set the AWS auth command to return exit code 0, then enter another prompt.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.107 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗