[BUG] Claude Code hangs silently with corrupted config instead of showing clear error
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 hangs indefinitely with no output when configuration files are corrupted. The only indication is an unhelpful error in debug logs: lK is not a function.
## Steps to Reproduce
- Have a corrupted file in
~/.claude/directory (cache, statsig, etc.) or corrupted~/.claude.json - Run
claudeorclaude login - Process hangs with blank screen - no output, no error message
## Expected Behavior
Claude should either:
- Display a clear error message indicating which config file is corrupted
- Offer to reset/clean the corrupted configuration automatically
- At minimum, not hang silently
## Actual Behavior
- Claude hangs indefinitely with no output
- Debug logs (
~/.claude/debug/latest) only show:
Failed to check enabledPlatforms: TypeError: lK is not a function
- No indication of what's wrong or how to fix it
## Workaround
Partial fix (doesn't always work):
```bash
rm ~/.claude/.credentials.json
Full fix (not always works):
rm -rf ~/.claude ~/.claude.json
claude login
Additional Context
- Tested on multiple servers with same result
- Tested versions: 2.1.5, 2.1.18, 2.1.20 - all exhibit same behavior
- The error lK is not a function appears to be minified code that fails to check platform configuration when config state is inconsistent
Environment
- OS: Linux (RHEL/CentOS)
- Node: v18.20.8
- Claude Code: 2.1.20
---
What Should Happen?
Claude should detect corrupted configuration files and display a clear error message like: "Configuration file ~/.claude/cache/xxx is corrupted. Run 'rm -rf ~/.claude' to reset." Instead of hanging silently, it should either auto-recover or guide the user to fix the
issue.
Error Messages/Logs
Steps to Reproduce
- Create a corrupted state by having invalid/inconsistent files in ~/.claude/ directory
(This can happen naturally when OAuth token expires or session is interrupted)
- Run: claude login
- Observe: Process hangs with blank screen - no output, no prompt, nothing
- Check debug log: tail ~/.claude/debug/latest
Shows only: "Failed to check enabledPlatforms: TypeError: lK is not a function"
- Workaround that does NOT fix it:
rm ~/.claude/.credentials.json
claude login
# Still hangs
- Workaround that DOES fix it:
rm -rf ~/.claude ~/.claude.json
claude login
# Works - shows login prompt
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.20
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗