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

Resolved πŸ’¬ 5 comments Opened Aug 10, 2025 by olexiy-dmytrash 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 β†—

This issue has 5 comments on GitHub. Read the full discussion on GitHub β†—