[BUG] Remote Authentication via VS Code Remote-SSH Fails macOS
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?
This appears to be a newly arrived bug with 2.0.22. The flow below worked correctly with prior versions
Claude Code cannot successfully retrieve an auth token in a Remote-SSH session within VS Code.
What Should Happen?
Claude code should read the subscription login token from the unlocked keychain. This was happening successfully when I last logged in on a previous VS Code session on 14/10/2025.
Running a direct SSH session from terminal and launching claude code from the terminal - outside of the VS Code environment - previously and currently on 2.0.22 works. The auth token is read from the unlocked keychain.
Error Messages/Logs
Steps to Reproduce
- Run Remote-SSH in VS Code to log into a project on a dev server. In that process keychain is unlocked - we can demonstrate keychain is unlocked.
- Run
claude - Claude starts and reports "Missing API Key . Run /login"
- Runn the login flow appears to succeed but yields: "Missing API Key . Run /login"
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.21 - I think - whatever was released on 14 October AEDT
Claude Code Version
2.0.22
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5957
- https://github.com/anthropics/claude-code/issues/9403
- https://github.com/anthropics/claude-code/issues/5244
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
same problem
+1
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
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.