[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

  1. kill the process when OOM
  2. reboot
  3. 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_

View original on GitHub ↗

43 Comments

headcrabz · 8 months ago

I am seeing same issue, any fixes?

costinalexiu-star · 8 months ago

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:

headcrabz left a comment (anthropics/claude-code#11864) <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3549257016> I am seeing same issue, any fixes? — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3549257016>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/B2LAYQOCFJWSZKVFCPEU6TD35NXU7AVCNFSM6AAAAACMOF744SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNBZGI2TOMBRGY> . You are receiving this because you authored the thread.Message ID: @.***>
headcrabz · 7 months ago

reinstalling Claude did not help

costinalexiu-star · 7 months ago

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:

headcrabz left a comment (anthropics/claude-code#11864) <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3549419644> reinstalling Claude did not help — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3549419644>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/B2LAYQNPM6P2AMFKRI7G2H335N44FAVCNFSM6AAAAACMOF744SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNBZGQYTSNRUGQ> . You are receiving this because you authored the thread.Message ID: @.***>
ssadhukha · 7 months ago

experiencing the same issue, clean reinstall did not fix...

szwang · 7 months ago

@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.43 or earlier that would be really helpful, we'll work on debugging and getting a repro on our end.

headcrabz · 7 months ago

@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"

headcrabz · 7 months ago

actually completely reinstalling and removing the .claude files as well worked.

sthornington · 7 months ago

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.

sthornington · 7 months ago

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.

ssadhukha · 7 months ago

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

sunriseinternational · 7 months ago

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.

sthornington · 7 months ago

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.

sthornington · 7 months ago

Shit, it upgraded itself to 2.0.49.

sthornington · 7 months ago

I switched the .local/bin/claude symlink 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!

costinalexiu-star · 7 months ago

That did not work for me

On Fri, Nov 21, 2025, 5:59 PM Simon Thornington @.***>
wrote:

sthornington left a comment (anthropics/claude-code#11864) <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3563656740> 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. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3563656740>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/B2LAYQPPM4MLY6KYBM7KCTD354ZHVAVCNFSM6AAAAACMOF744SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNRTGY2TMNZUGA> . You are receiving this because you were mentioned.Message ID: @.***>
sthornington · 7 months ago

It keeps wanting to revert to 2.0.49 which is broken, but if I recreate the symlink from .local/bin/claude -> ..../2.0.41 then I can keep working.

ssadhukha · 7 months ago

I'm using 2.0.41 now following @sthornington 's steps but def had to disable the auto-updating with claude config set autoUpdates disabled

sunriseinternational · 7 months ago

It 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.

costinalexiu-star · 7 months ago

Hmmm, I was using Linux when this happened.

On Tue, Nov 25, 2025, 10:40 PM sunriseinternational <
@.***> wrote:

sunriseinternational left a comment (anthropics/claude-code#11864) <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3577496106> It 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. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/11864#issuecomment-3577496106>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/B2LAYQNZL47XYYSB27BNNAL36S5CVAVCNFSM6AAAAACMOF744SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNZXGQ4TMMJQGY> . You are receiving this because you were mentioned.Message ID: @.***>
sthornington · 7 months ago

I use Linux x86_64 in an orbstack container on my MacBook.

anthony-wss · 7 months ago

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.

tomp · 7 months ago

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?

kwilliamszaf · 7 months ago

Same problem. Only 2.0.41 works for me. Even the recent 2.0.60 still has this bug.

0x53 · 7 months ago

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.

jbnitorum · 7 months ago

I have the same issue... reverting to 2.0.41 and recreating symlink seems to be working for now

geoff-maddock · 7 months ago

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 upgrade process, 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)

export DISABLE_AUTOUPDATER=1
sthornington · 6 months ago

2.0.67 still has the issue, 2.0.41 still does not. Enormously frustrating!

geoff-maddock · 6 months ago

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.

SamD · 6 months ago

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

tomp · 6 months ago
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.

geoff-maddock · 6 months ago

I found that if I add a .claude/settings.local.json file 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:

{
  "permissions": {
    "allow": [
      "Bash(sed:*)",
      "Bash(npx create-react-router@latest . --template remix-run/react-router/templates/basic --yes)",
      "Bash(npm install)",
      "Bash(npm install:*)",
      "Bash(cat:*)",
      "Bash(python3:*)",
      "Bash(npx openapi-typescript:*)",
      "Bash(npx tailwindcss:*)",
      "Bash(npm run type-check:*)",
      "Bash(npm run build:*)",
      "mcp__plugin_playwright_playwright__browser_navigate",
      "mcp__plugin_playwright_playwright__browser_close",
      "Bash(curl:*)"
    ],
    "deny": [],
    "ask": []
  }
}
anthony-wss · 6 months ago

Re-installing via npm worked for me. It seems there is an issue with the executable provided by the official download script.

npm install -g @anthropic-ai/claude-code

Hopefully, this gets fixed soon. I have been using 2.0.41 for several weeks.

jonfreeland · 6 months ago

Running Claude Code in a node:22 Docker container and the following worked for me on the latest Claude Code version:

claude < /dev/tty

So I just added an alias:

echo "alias claude='claude < /dev/tty'" >> ~/.bashrc
andycasey · 5 months ago

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.

teclabat · 5 months ago

_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.

andycasey · 5 months ago

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 cd back to my home directory, run git init, then Claude works fine.

Here's a video showing it: https://astrowizici.st/claude-bug.mov

sudo-install-MW · 4 months ago

I still have this annoying issue, nothing seem to work on a linux machine

JoeyTPChou · 4 months ago
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 cd back to my home directory, run git init, then Claude works fine. Here's a video showing it: https://astrowizici.st/claude-bug.mov

BEST SOLUTION! It works for me LOL

Nantris · 3 months ago

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.

andycasey · 3 months ago
Nantris · 3 months ago

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.62 to 2.1.79 and it's not fixed.

Last night I was able to move on by trashing everything with git reset --hard and git clean -fd but today that doesn't work either so I'm stuck with Claude Code 100% unusable.

tadam777 · 1 month ago

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.