[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:
- Telemetry settings are hardcoded or not properly reading configuration values on Windows
- The telemetry system ignores
CLAUDE_CODE_ENABLE_TELEMETRY=0
- OpenTelemetry SDK cannot be properly disabled despite
OTEL_SDK_DISABLED=true
- Some OTEL exporter settings cause crashes when set to "none"
📚 Related Documentation
[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
📋 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:
2. Environment variables (temporary):
3. Environment variables (permanent):
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:
.claude/settings.local.jsonto{}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=nonecaused Claude Code to crash with:The telemetry output includes:
This sensitive information is being output to console every 30 seconds regardless of user preferences to disable telemetry.
🔍 Additional Information
🎯 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:
CLAUDE_CODE_ENABLE_TELEMETRY=0OTEL_SDK_DISABLED=true📚 Related Documentation