[BUG] CLAUDE_CODE_API_KEY_HELPER_TTL_MS not working from settings.json

Resolved 💬 7 comments Opened Sep 15, 2025 by shearic Closed Jan 31, 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?

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.

eg:

{
    "env": {
        "CLAUDE_CODE_API_KEY_HELPER_TTL_MS": "900000",
        "ANTHROPIC_BASE_URL": "https://localhost:9876/anthropic-proxy"
    },
    "apiKeyHelper": "get-token"
}

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

  1. Run claude against an endpoint with a token to be used via apiKeyHelper
  2. Set up settings.json with "CLAUDE_CODE_API_KEY_HELPER_TTL_MS": "900000"
  3. See that claude calls the helper at >= 5 minutes from last fetch instead of >= 15 minutes

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.113
Node v24.6.0

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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