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

Resolved 💬 6 comments Opened Oct 19, 2025 by mike-hai-ts Closed Jan 12, 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?

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_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗