[BUG] claude starts and 3 seconds later exits.
Open 💬 43 comments Opened Nov 18, 2025 by costinalexiu-star
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?
I have had to kill claude as it completely filled the memory (maybe another bug), but when I tried to start it again it brings up the prompt, then exits cleanly. I have tried removing it completely, then did a clean reinstall and the same think happened. I should probably mention that this happened on AlmaLinux, after OOM kill. strace showing main process never reads stdin. Works with strace -o file.txt but not normally
What Should Happen?
typing claude should bring up the chat prompt and stay open.
Error Messages/Logs
No errors, just a clean exit.
Steps to Reproduce
- kill the process when OOM
- reboot
- type claude
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.44
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Xterm
Additional Information
_No response_
43 Comments
I am seeing same issue, any fixes?
I had to make a fresh installation of Linux in order for it to work again.
It messed something up real bad.
On Tue, Nov 18, 2025, 9:30 PM headcrabz @.***> wrote:
reinstalling Claude did not help
That's right, I reinstall the whole os and then Claude. But I saved the
history, in fact everything under .claude
On Tue, Nov 18, 2025, 10:14 PM headcrabz @.***> wrote:
experiencing the same issue, clean reinstall did not fix...
@costinalexiu-star thank you for reporting! @headcrabz @ssadhukha what operating system are you using? Did this also happen for you with OOM?
Also, if you anyone could try reproducing with version
2.0.43or earlier that would be really helpful, we'll work on debugging and getting a repro on our end.@szwang I tried uninstalling 2.0.45 and installed 2.0.42, still the same issue. This is NAME="Oracle Linux Server" VERSION="8.9"
actually completely reinstalling and removing the .claude files as well worked.
I'm getting this too, it's now unusable. I tried reinstalling, including wiping all trace of claude I could find, no dice. This is in orbstack x86_64 container on a MacBook. How do I install a specific version?
EDIT: I tried to install a specific version 2.0.43 but it's a 0-length binary and the install fails.
I have cleaned up everything I can possibly think of, but installing claude still doesn't work. The symptom for me was, I went to use claude for the first time in a while, upgraded it for the heck of it, and now it just exits. I can't get it working again. Hope we can fix this in the next day or two or else I'm going to have to cancel my Max sub until it's fixed, it's unusable.
I'm using RHEL 8.10 on a remote HPC, x86_64, xterm-256color. I'm experiencing that same issue as @sthornington. Tried clean reinstalls of 2.0.43, 2.0.46, and 2.0.47. But the issue persists. I hadn't used it in only like 18 hrs or so, before then it was working perfectly
This is occurring for me with an AMD Ryzen 5 5500, Windows 10 with WSL. Claude Code is currently not usable at all, version 2.0.47.
The linked duplicate bug has a workaround that worked for me!
Wipe out all your claude stuff in .local and .claude, then:
curl -fsSL https://claude.ai/install.sh | bash -s 2.0.41
This fixed it for me.
Shit, it upgraded itself to 2.0.49.
I switched the
.local/bin/claudesymlink back to 2.0.41 and it seems to be holding steady for this session... this is a real problem guys I hope you find the solution soon!That did not work for me
On Fri, Nov 21, 2025, 5:59 PM Simon Thornington @.***>
wrote:
It keeps wanting to revert to 2.0.49 which is broken, but if I recreate the symlink from
.local/bin/claude -> ..../2.0.41then I can keep working.I'm using 2.0.41 now following @sthornington 's steps but def had to disable the auto-updating with
claude config set autoUpdates disabledIt looks like this is WSL failing, not claude. I uninstalled WSL, turned off Virtualization in Windows Features, restarted, then reinstalled WSL. Afterwards it works as per normal.
Hmmm, I was using Linux when this happened.
On Tue, Nov 25, 2025, 10:40 PM sunriseinternational <
@.***> wrote:
I use Linux x86_64 in an orbstack container on my MacBook.
Had the same issue on RHEL (kernel 4.18.0-513.24.1.el8_9.x86_64).
Installing version 2.0.41 works for me. Looking forward to a fix for this. Thanks.
I'm seeing this also, running Claude Code 2.0.56 in RHEL 8.
I'm still learning to use Claude, so I don't have that much to lose if I were to zap all of my ~/.claude files, but I'd like to preserve my history. Any idea which ~/.claude/ files probably need to be removed to fix this behavior?
Same problem. Only 2.0.41 works for me. Even the recent 2.0.60 still has this bug.
Also encountering the same issue. Briefly tried to RE the binary and see what error was being thrown and I believe it is "A JavaScript exception was thrown, but it was cleared before it could be read" if that is any help at all.
I have the same issue... reverting to 2.0.41 and recreating symlink seems to be working for now
Had the same issue, on WSL1, was using 2.0.65, it would start and crash within a few seconds.
Reverting to 2.0.41 and using the right symlink is working so far.
PS: However, now I find that if I repoint the symlink, then kill claude and restart it, the symlink in ~/.local/bin reverts back to 2.0.65. Not sure why that would happen. I tried the manual
claude upgradeprocess, which took me up to 2.0.69, but still having the same start then crash error.PPS: Even adding the env var did not work (it still updated on restart)
2.0.67 still has the issue, 2.0.41 still does not. Enormously frustrating!
I installed this on my other machine,
Claude Code v2.0.76
Machine is Windows 11 running WSL1 on Ubuntu 20.04.3 LTS
Totally fresh install, so there was no Claude on here previously.
Same experience as my other machine - it starts then 1-3 seconds crashes.
Ran with ``
claude --debug``, attaching the debug file here.7b590424-90e8-432e-bcc2-dc48882a3080.txt
In the debug, it's trying to run powershell commands in WSL, which seems odd.
Just trying claude-code for the first time and experienced this.
This is not the experience you want potentially new paying customers having the very first time they try it
A colleague of mine experienced the same thing, a month or so ago, when they first tried to use Claude Code. They have not been motivated to try it again since that. If I hadn't had a few good experiences with it before this issue hi me, I'd probably be using something else now, too.
I found that if I add a
.claude/settings.local.jsonfile to my project, it no longer crashes.Not sure if the commands allowed have anything to do with it, but here's what I have currently:
Re-installing via npm worked for me. It seems there is an issue with the executable provided by the official download script.
Hopefully, this gets fixed soon. I have been using 2.0.41 for several weeks.
Running Claude Code in a
node:22Docker container and the following worked for me on the latest Claude Code version:So I just added an alias:
I've had this problem for some months now. I tried to have claude code diagnose the issue remotely from my macbook, and it failed. The only way to resolve it was to revert to 2.0.41.
_Same issue in OpenSuse WSL1. It started with git was missing for marketplace. After installing git same message again. I wiped everything and reinstalled claude. Now it exits immediately with no error._
Got it working after switching to WSL2.
It seems this error occurs when Claude is run from a directory that is not a git repository (#12084).
If I try in my home directory, it exits immediately.
If I try in a directory with a git repo, it works.
If I
cdback to my home directory, rungit init, then Claude works fine.Here's a video showing it: https://astrowizici.st/claude-bug.mov
I still have this annoying issue, nothing seem to work on a linux machine
BEST SOLUTION! It works for me LOL
Seeing this every minute of every day and spending hours troubleshooting an expensive product and unable to use it, just to find that the issue is 4 months old and completely unaddressed. It's not okay.
Apparently this is fixed in 2.1.76: https://github.com/anthropics/claude-code/issues/12084#issuecomment-4065180175
I see a lot of mentions that this only happens outside git directories but for me it only happens inside certain git directories that Claude has worked on and somehow caused to enter this state. I've tried versions from
2.1.62to2.1.79and it's not fixed.Last night I was able to move on by trashing everything with
git reset --hardandgit clean -fdbut today that doesn't work either so I'm stuck with Claude Code 100% unusable.Bug still present in Claude Code 2.1.150
Workaround that worked for me:
Add this line to ~/.bashrc:
claude() { script -q -e -f /dev/null command claude "$@"; }
Then source ~/.bashrc if you want to test it immediately (next times it will load at startup).
Works from any directory, including empty non-git folders.
Why it works: Claude spawns shell detection subprocesses at startup that inherit and consume stdin, causing the main process to receive EOF and exit cleanly with code 0 (related: #12507, #13598). script allocates a fresh pty via forkpty(3), giving those subprocesses a clean stdin. Same reason strace -o file.txt claude works - both add an interception layer that changes fd inheritance behavior.
Also fixes the non-git directory trigger noted in #12084 - but the wrapper handles both cases at once.