Claude Code exits immediately after launch with no output or error mes — Claude Code Certified Professional Practice — Claude Cert Academy
Claude Code exits immediately after launch with no output or error message. What is the first diagnostic step?
- Reinstall Claude Code with npm install -g --force
- Delete the ~/.claude directory and start fresh
- Verify that ANTHROPIC_API_KEY is set and non-empty in your shell environment
- Downgrade to a prior version of Claude Code
Answer: Verify that ANTHROPIC_API_KEY is set and non-empty in your shell environment
A missing or empty API key is the most common cause of silent immediate failures. Checking echo $ANTHROPIC_API_KEY should be the first step before more invasive debugging.
Continue to Claude Cert Academy