[BUG] The `apiKeyHelper` path is not expanded on Windows

Resolved 💬 5 comments Opened Dec 3, 2025 by jozefizso Closed Feb 7, 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?

We are using Claude Code with AWS Bedrock. To authenticate, we have our own helper .exe tool on Windows. While the path to the apiKeyHelper tool is expanded on Linux and macOS and the user can set a path like ~/auth-helper, this expansion is not supported on Windows.

What Should Happen?

I expected these paths in the settings.json will resolve to the full path of the help tool:

"apiKeyHelper": "~/claude-credential-helper/tool.exe"
"apiKeyHelper": "%HOMEPATH%\\claude-credential-helper\\tool.exe"
"apiKeyHelper": "${HOMEPATH}\\claude-credential-helper\\tool.exe"

Error Messages/Logs

Error getting API key from apiKeyHelper (in settings or ~/.claude.json): apiKeyHelper did not return a valid value

Steps to Reproduce

  1. Update %HOMEPATH%\.claude\settings.json:
  2. Set apiKeyHelper path to string like %HOMEPATH%\\claude-credential-helper\\tool.exe
  3. Run claude in Terminal
  4. Claude shows error Error getting API key from apiKeyHelper (in settings or ~/.claude.json): apiKeyHelper did not return a valid value

Only a full path like C:\\Users\\username\\claude-credential-helper\\tool.exe works.

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.58

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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