You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] CLAUDE_CODE_API_KEY_HELPER_TTL_MS not working from settings.json #7660
I have searched existing issues and this hasn't been reported yet
This is a single bug report (please file separate reports for different bugs)
I am using the latest version of Claude Code
What's Wrong?
When running claude in Node v24.6.0, setting CLAUDE_CODE_API_KEY_HELPER_TTL_MS in settings.json to any value does not work, it continues to behave with the default of 5 minutes. When running claude in Node v20.10.0 it works as expected.
Setting this value from the calling environment does work however:
$ CLAUDE_CODE_API_KEY_HELPER_TTL_MS=900000 claude
This will behave with the expected timeout of 15 minutes.
This problem may be a regression in the last few versions - I can't guarantee but I think 1.0.105 did not have this problem, but by 1.0.112 this problem existed and does in current 1.0.113.
What Should Happen?
The value of CLAUDE_CODE_API_KEY_HELPER_TTL_MS in settings.json should work so it is not required to be inherited from the calling environment.
Error Messages/Logs
Steps to Reproduce
Run claude against an endpoint with a token to be used via apiKeyHelper
Set up settings.json with "CLAUDE_CODE_API_KEY_HELPER_TTL_MS": "900000"
See that claude calls the helper at >= 5 minutes from last fetch instead of >= 15 minutes
I've discovered that the errant behavior is happening in my node v24.6.0 environment but claude does not exhibit this problem running in my node v20.10.0 environment.
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.
Workaround that proves Claude Code cache is broken:
Implementing manual caching within the apiKeyHelper script using Windows DPAPI encryption successfully caches for the configured TTL. This confirms the issue is with Claude Code's cache implementation.
This is a core authentication feature that has been broken for 3+ months across multiple platforms. Please prioritize a fix - users with interactive auth methods (1Password, AWS SSO, hardware keys) are severely impacted."
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 was closed incorrectly despite recent human comments. This behavior of the bot is reported at #16497. Please upvote that issue, so maybe it gets noticed.
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.
Activity
github-actions commentedon Sep 15, 2025
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
shearic commentedon Sep 15, 2025
I've discovered that the errant behavior is happening in my node v24.6.0 environment but claude does not exhibit this problem running in my node v20.10.0 environment.
github-actions commentedon Dec 5, 2025
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.
vladhietala commentedon Dec 30, 2025
This issue is still occurring and affects Windows as well (not just macOS/Bedrock).
Confirming the problem on Windows (v2.0.37):
CLAUDE_CODE_API_KEY_HELPER_TTL_MSis being read fromsettings.jsonand passed to the script correctlyapiKeyHelperis called every ~5 minutes regardless of TTL settingEvidence:
Workaround that proves Claude Code cache is broken:
Implementing manual caching within the
apiKeyHelperscript using Windows DPAPI encryption successfully caches for the configured TTL. This confirms the issue is with Claude Code's cache implementation.This is a core authentication feature that has been broken for 3+ months across multiple platforms. Please prioritize a fix - users with interactive auth methods (1Password, AWS SSO, hardware keys) are severely impacted."
github-actions commentedon Jan 31, 2026
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.
marcindulak commentedon Jan 31, 2026
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at #16497. Please upvote that issue, so maybe it gets noticed.
github-actions commentedon Feb 7, 2026
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.