[BUG] Startup failure due to malformed telemetry files in ~/.claude/telemetry/
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?
Claude Code fails to start when telemetry files accumulate in ~/.claude/telemetry/.
Files named 1p_failed_events.*.json contain JSON Lines format (multiple JSON objects
per file) but have .json extension, causing a JSON parse error on startup.
What Should Happen?
Claude Code should start successfully even when telemetry files are present.
Either the files should use .jsonl extension, or the startup process should
handle malformed telemetry files gracefully instead of crashing.
Error Messages/Logs
Steps to Reproduce
- Use Claude Code normally for a period of time
- Work in a corporate proxy environment (telemetry transmission fails and events accumulate in
~/.claude/telemetry/) - Exit Claude Code
- Try to restart Claude Code
- Application fails to start with authentication error (401)
Workaround
rm -rf ~/.claude/telemetry
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.69
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
generated report by Claude Code CLI
Claude Code Bug Report: Startup Failure due to Malformed Telemetry Files
Summary
Claude Code fails to start when telemetry files in ~/.claude/telemetry/ are present. These files are in JSON Lines format (.jsonl) but have .json file extensions, causing JSON parsing errors during startup.
Environment
- OS: Windows 11
- Shell: Git Bash (MINGW64_NT-10.0-22631)
- Claude Code Version: 2.1.69 (based on telemetry data)
- Node Version: v24.3.0
Steps to Reproduce
- Use Claude Code normally for a period of time (telemetry files accumulate)
- Exit Claude Code
- Try to restart Claude Code
- Application fails to start
Root Cause
Files in ~/.claude/telemetry/ directory with pattern 1p_failed_events.*.json contain multiple JSON objects (JSON Lines format) but have .json extension. Example:
~/.claude/telemetry/1p_failed_events.01635425-b1f2-4a29-9277-fead101ee290.0ca514d6-5422-4d3b-9492-fd119d5910b9.json
File contents (multiple JSON objects on separate lines):
{"event_type":"ClaudeCodeInternalEvent","event_data":{...}}
{"event_type":"ClaudeCodeInternalEvent","event_data":{...}}
{"event_type":"ClaudeCodeInternalEvent","event_data":{...}}
When parsed as standard JSON (based on .json extension), this causes:
Error: Extra data: line 2 column 1 (char 1353)
Affected Files
27 telemetry files were found with this issue in my installation:
1p_failed_events.01635425-b1f2-4a29-9277-fead101ee290.0ca514d6-5422-4d3b-9492-fd119d5910b9.json1p_failed_events.04cb5e6b-c2b6-4441-a0cd-d8f72cdd84c3.690caded-5b0b-4bf2-925a-002e9feeb2ac.json- (... and 25 more files with similar naming pattern)
Workaround
Delete or move the ~/.claude/telemetry/ directory:
rm -rf ~/.claude/telemetry
# or
mv ~/.claude ~/.claude-backup
Claude Code will start successfully after removing these files.
Suggested Fixes
Option 1: Use correct file extension
Rename files to .jsonl to properly indicate JSON Lines format:
1p_failed_events.*.jsonl
Option 2: Write valid JSON
If .json extension is required, wrap multiple events in a JSON array:
[
{"event_type":"ClaudeCodeInternalEvent","event_data":{...}},
{"event_type":"ClaudeCodeInternalEvent","event_data":{...}}
]
Option 3: Skip malformed files
Add error handling during startup to skip or delete corrupted telemetry files rather than failing the entire application launch.
Impact
- Severity: High - Prevents application from starting
- Frequency: Occurs after normal usage once telemetry files accumulate
- User Impact: Complete loss of functionality until manual intervention
Additional Notes
- All other files in
~/.claude/directory structure were validated as correct JSON - Only files in
telemetry/subdirectory had this issue - The telemetry files appear to be "failed events" based on the filename pattern, suggesting they may be edge cases in error handling
---
Reproduction timestamp: 2026-03-05
Reporter environment: Windows 11, Git Bash
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗