claude-code - 💡(How to fix) Fix [BUG] otelHeadersHelper is not being called - No errors or logs indicate issue

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

I can't figure out how to troubleshoot this I'm getting no logs or error messages from claude

Code Example

I can't figure out how to troubleshoot this I'm getting no logs or error messages from claude

My own log file in the script is never created indicating its not being called. I confirmed the command works though.

---

TOKEN=$(gcloud auth print-identity-token --impersonate-service-account=xxxxx --include-email --audiences=xxxx 2>/dev/null)
HEADER="{\"Authorization\":\"Bearer $TOKEN\"}"
echo "Called" >> "/Users/ME/.claude/otel-debug.log"
echo $HEADER

---

{
 "env": {
    "CLAUDE_LOG_LEVEL":"debug",
    "CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS":"540000",
    "CLAUDE_CODE_USE_VERTEX": "1",
    "CLOUD_ML_REGION":"global",
    "ANTHROPIC_VERTEX_PROJECT_ID":"xxxxxx",
    "DISABLE_PROMPT_CACHING":"1",
    "CLAUDE_CODE_ENABLE_TELEMETRY":"1",
    "OTEL_METRICS_EXPORTER":"otlp",
    "OTEL_LOGS_EXPORTER":"otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL":"grpc",
    "OTEL_EXPORTER_OTLP_ENDPOINT":"xxxxxxx",
    "OTEL_EXPORTER_OTLP_TIMEOUT":"120000",
    "OTEL_METRIC_EXPORT_INTERVAL":"5000",
    "OTEL_LOGS_EXPORT_INTERVAL":"5000",
    "OTEL_RESOURCE_ATTRIBUTES":"department=xxxx,team.id=xxx,cost_center=xxxx"
  },
  "otelHeadersHelper":"bash /tmp/claude_otel_refresh_token.sh"
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • 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?

otelHeadersHelper is never executed

What Should Happen?

otelHeadersHelper should execute the command

Error Messages/Logs

I can't figure out how to troubleshoot this I'm getting no logs or error messages from claude

My own log file in the script is never created indicating its not being called. I confirmed the command works though.

Steps to Reproduce

Token script:

TOKEN=$(gcloud auth print-identity-token --impersonate-service-account=xxxxx --include-email --audiences=xxxx 2>/dev/null)
HEADER="{\"Authorization\":\"Bearer $TOKEN\"}"
echo "Called" >> "/Users/ME/.claude/otel-debug.log"
echo $HEADER

Settings file:

{
 "env": {
    "CLAUDE_LOG_LEVEL":"debug",
    "CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS":"540000",
    "CLAUDE_CODE_USE_VERTEX": "1",
    "CLOUD_ML_REGION":"global",
    "ANTHROPIC_VERTEX_PROJECT_ID":"xxxxxx",
    "DISABLE_PROMPT_CACHING":"1",
    "CLAUDE_CODE_ENABLE_TELEMETRY":"1",
    "OTEL_METRICS_EXPORTER":"otlp",
    "OTEL_LOGS_EXPORTER":"otlp",
    "OTEL_EXPORTER_OTLP_PROTOCOL":"grpc",
    "OTEL_EXPORTER_OTLP_ENDPOINT":"xxxxxxx",
    "OTEL_EXPORTER_OTLP_TIMEOUT":"120000",
    "OTEL_METRIC_EXPORT_INTERVAL":"5000",
    "OTEL_LOGS_EXPORT_INTERVAL":"5000",
    "OTEL_RESOURCE_ATTRIBUTES":"department=xxxx,team.id=xxx,cost_center=xxxx"
  },
  "otelHeadersHelper":"bash /tmp/claude_otel_refresh_token.sh"
}

I get not errors and otelHeadersHelper is never executed.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.81 (Claude Code)

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The otelHeadersHelper script is not being executed, likely due to incorrect configuration or environment settings.

Guidance

  • Verify that the otelHeadersHelper path in the settings file is correct and the script has execute permissions.
  • Check the environment variables set in the settings file, such as CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS, to ensure they are not preventing the script from running.
  • Add logging or debugging statements to the otelHeadersHelper script to confirm it is being called and to identify any potential issues.
  • Review the Claude Code documentation to ensure that the otelHeadersHelper configuration is correct and compatible with version 2.1.81.

Example

No code snippet is provided as the issue is likely related to configuration or environment settings.

Notes

The lack of error messages or logs makes it difficult to determine the root cause of the issue. Additional debugging or logging may be necessary to identify the problem.

Recommendation

Apply workaround: Verify the otelHeadersHelper configuration and environment settings to ensure they are correct and compatible with the Claude Code version being used.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING