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

[BUG] Remote Authentication via VS Code Remote-SSH Fails macOS

Open mike-hai-ts opened this issue 1 year ago • 6 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?

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

  1. 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.
  2. Run claude
  3. Claude starts and reports "Missing API Key . Run /login"
  4. 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

mike-hai-ts avatar Oct 19 '25 06:10 mike-hai-ts

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5957
  2. https://github.com/anthropics/claude-code/issues/9403
  3. 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

github-actions[bot] avatar Oct 19 '25 06:10 github-actions[bot]

same problem

igs-qilincai avatar Nov 01 '25 02:11 igs-qilincai

+1

lstroud avatar Nov 05 '25 15:11 lstroud

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.

github-actions[bot] avatar Dec 12 '25 10:12 github-actions[bot]

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.

github-actions[bot] avatar Jan 12 '26 10:01 github-actions[bot]

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.

github-actions[bot] avatar Jan 20 '26 14:01 github-actions[bot]