[BUG] OpenTelemetry telemetry cannot be disabled on Windows - outputs personal data every 30 seconds

Status Closed โ€” not planned
Maintainer reply None cached
Activity 5 comments ยท opened Aug 10, 2025 ยท closed Jan 21, 2026

[BUG] OpenTelemetry telemetry cannot be disabled on Windows - outputs personal data every 30 seconds

๐Ÿ› Bug Description

Claude Code continuously outputs OpenTelemetry telemetry data every ~30 seconds to the console, including personal information (email, user IDs, session IDs). None of the documented methods to disable telemetry work.

๐Ÿ’ป Environment

  • OS: Windows
  • Claude Code Version: 1.0.72
  • Shell: Windows Command Prompt

๐Ÿ“‹ Expected Behavior

Telemetry should be disabled when using any of the documented methods.

โŒ Actual Behavior

OpenTelemetry data continues to output to console regardless of configuration:

{
  descriptor: {
    name: 'claude_code.cache.tokens',
    type: 'COUNTER',
    description: 'Token counts by cache event type',
    unit: 'token',
    valueType: 1,
    advice: {}
  },
  dataPointType: 3,
  dataPoints: [
    {
      attributes: {
        'user.id': '255c2d5722a33636c812498aa383426f5e43b7c8f8e5e7c4c1045941a836e352',
        'session.id': '5c8ec950-a888-45ec-a5f7-cc2c52284ca4',
        'organization.id': 'd8854cc6-a5a9-46e9-bd5b-16b4bdef71c3',
        'user.email': 'olexiy.dmytrash@gmail.com',
        'user.account_uuid': 'da066612-4c1d-44d3-9f1d-1420b41f11d7',
        type: 'cacheCreation',
        model: 'claude-sonnet-4-20250514'
      },
      startTime: [ 1754844204, 923000000 ],
      endTime: [ 1754844338, 635000000 ],
      value: 6077
    }
  ]
}

๐Ÿ”ง Methods Attempted (ALL FAILED)

1. Configuration command:

claude config set --global verbose false

2. Environment variables (temporary):

set CLAUDE_CODE_ENABLE_TELEMETRY=0

3. Environment variables (permanent):

setx CLAUDE_CODE_ENABLE_TELEMETRY 0

4. Settings in .claude/settings.local.json:

{
  "env": {
    "CLAUDE_CODE_ENABLE_TELEMETRY": "0",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "DISABLE_TELEMETRY": "1",
    "OTEL_SDK_DISABLED": "true",
    "OTEL_TRACES_EXPORTER": "none",
    "OTEL_METRICS_EXPORTER": "none",
    "OTEL_LOGS_EXPORTER": "none",
    "NO_TELEMETRY": "1"
  }
}

5. Complete reset to defaults:

  • Cleared .claude/settings.local.json to {}
  • Cleared all OTEL environment variables
  • Restarted Claude Code multiple times
  • Rebooted Windows 10 - telemetry persisted

6. OpenTelemetry-specific variables:

{
  "env": {
    "OTEL_SDK_DISABLED": "true",
    "OTEL_METRIC_EXPORT_INTERVAL": "3600000",
    "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT": "3600000"
  }
}

Note: Setting OTEL_METRICS_EXPORTER=none caused Claude Code to crash with:

Error: Unknown exporter type set in OTEL_EXPORTER_OTLP_METRICS_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL env var: none

โš ๏ธ Privacy Concerns

The telemetry output includes:

  • Personal email addresses
  • User IDs
  • Session IDs
  • Organization IDs
  • Account UUIDs

This sensitive information is being output to console every 30 seconds regardless of user preferences to disable telemetry.

๐Ÿ” Additional Information

  • Issue persists across multiple Claude Code sessions
  • Problem occurs immediately after starting Claude Code
  • Console output makes normal CLI usage difficult
  • All documented telemetry disable methods have been exhausted
  • System reboot did not resolve the issue
  • Complete configuration reset did not resolve the issue

๐ŸŽฏ Current Workaround

Partial success: Increasing the telemetry export interval reduces frequency but doesn't eliminate the issue:

{
  "env": {
    "OTEL_METRIC_EXPORT_INTERVAL": "3600000"
  }
}

This changes output from every 30 seconds to every hour, but telemetry is still active.

๐Ÿ’ก Root Cause Analysis

This appears to be a bug where:

  1. Telemetry settings are hardcoded or not properly reading configuration values on Windows
  2. The telemetry system ignores CLAUDE_CODE_ENABLE_TELEMETRY=0
  3. OpenTelemetry SDK cannot be properly disabled despite OTEL_SDK_DISABLED=true
  4. Some OTEL exporter settings cause crashes when set to "none"

๐Ÿ“š Related Documentation

View original on GitHub โ†—

5 Comments

github-actions[bot] ยท 10 months ago

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.

bionicles ยท 9 months ago

Privacy concerns persist, please keep the issue open

github-actions[bot] ยท 8 months ago

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 ยท 8 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] ยท 8 months ago

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.