[BUG] Claude Code 2.1.30/2.1.31 silently exits on startup with code 0 on Linux 4.18.0

Status Fixed / completed
Reported on v2.1.30
Maintainer reply ✓ Yes — ant-kurt
Activity 9 comments · opened Feb 4, 2026 · closed Mar 16, 2026
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

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 versions 2.1.30 and 2.1.31 silently exit immediately after startup with exit code 0. Version 2.1.19 works correctly. No error message is displayed.

Environment

  • OS: Linux 4.18.0 (RHEL/CentOS)
  • Node: v18.20.8
  • Install method: Native installer
  • Working version: 2.1.19
  • Broken versions: 2.1.30, 2.1.31

Behavior

The process completes its full startup sequence, renders the welcome screen and REPL prompt, then silently exits with code 0 within ~1 second.

--version and --help work fine. Only interactive mode is affected.

Debug logs

Debug logs (~/.claude/debug/) confirm startup completes through [REPL:mount] REPL mounted, disabled=false, UI renders, and then the process exits with no error or crash logged.

Tested

  • Different terminal sizes (18 rows to 40+ rows)
  • Different TERM values (TERM=xterm-256color)
  • Explicit stdin (< /dev/tty)
  • Minimal environment (env -i HOME=$HOME PATH=$PATH TERM=$TERM)
  • autoUpdates: false in .claude.json

All produce the same result.

Workaround

Pinned to 2.1.19 by setting the immutable flag on the versions directory to prevent the auto-updater from re-downloading broken versions:
chattr +i /root/.local/share/claude/versions/

Note: autoUpdates: false in .claude.json did not prevent the auto-updater from running.

What Should Happen?

Claude should not automatically exit on startup.

Error Messages/Logs

Steps to Reproduce

Simply start claude with the command : "claude"

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.19

Claude Code Version

2.1.31

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

9 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/12084
  2. https://github.com/anthropics/claude-code/issues/12507
  3. https://github.com/anthropics/claude-code/issues/22539

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

eerelated · 6 months ago

Although similar in behaviour, the issue seems different than the other similar ones found. In my case, 2.1.19 works perfectly well. And I cannot reproduce the issue with 2.1.19...

MattCarothers · 6 months ago

I'm having the same problem with RHEL 8.10. I think there might be a typo in the original report, though. The last working version is 2.1.29 rather than 2.1.19. This doesn't appear to be a duplicate issue.

eerelated · 6 months ago
I'm having the same problem with RHEL 8.10. I think there might be a typo in the original report, though. The last working version is 2.1.29 rather than 2.1.19. This doesn't appear to be a duplicate issue.

I didn't try all previous versions - simply used the last 'stable' version and it worked. One workaround that I found in these forums and that work for me is to init Git in the project folder. Weirdly enough, it solves the issue.

netgull · 6 months ago

Same issue, since 2.1.29, native installer, Rocky 8.10. Run with clean terminal env too, issue still persists.

netgull · 6 months ago

The issue does not happen if there is a git repository in the current directory. If I just run git init then claude then the session does not exit prematurely.

ferranbonas · 5 months ago

Same problem here.

cat /etc/redhat-release

Rocky Linux release 8.10 (Green Obsidian)

uname -a

Linux homelab-01 4.18.0-553.109.1.el8_10.x86_64 #1 SMP Tue Mar 3 16:05:15 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

Initializing git init works fine! Thanks @netgull

ant-kurt collaborator · 5 months ago

You should no longer see this premature exit on Claude Code 2.1.76.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.