[BUG] Claude Code silently exits (code 0) when git is not installed

Resolved 💬 5 comments Opened Mar 13, 2026 by DigitalCyberSoft Closed Apr 11, 2026

Description

Claude Code interactive mode renders the TUI welcome screen, then immediately exits with code 0 when git is not installed on the system. No error message is shown. The user has no indication that git is a required dependency.

Steps to Reproduce

  1. Use a fresh Linux server without git installed (e.g. Fedora 42 minimal VPS)
  2. Install Claude Code: curl -fsSL https://claude.ai/install.sh | sh
  3. Run claude
  4. TUI renders the welcome screen, REPL prompt appears, then process exits immediately with code 0
  5. Terminal dumps VTE escape codes after exit

Expected Behavior

Claude Code should either:

  • Print a clear error: Error: git is required but not found. Install it with: dnf install git / apt install git
  • Or list git as a dependency in the install script and check for it during installation

Actual Behavior

  • Silent exit with code 0
  • No error message whatsoever
  • claude doctor does not flag missing git
  • claude --version works fine
  • claude -p "hello" gives misleading error: Error: Input must be provided either through stdin or as a prompt argument when using --print
  • Hours of debugging required to identify the cause

Environment

  • Claude Code: v2.1.74
  • OS: Fedora 42 (kernel 6.18), Vultr VPS, 2GB RAM, x86_64
  • Shell: bash
  • TERM: xterm-256color
  • TTY: Valid /dev/pts/0

Fix Confirmation

dnf install git immediately resolves the issue. Claude stays open and functions normally after git is installed.

Related Issues

  • #23195 — exits in non-git directories (same silent exit behavior)
  • #27455 — exits in non-git directories post v2.1.29

Notes

  • The install script (claude.ai/install.sh) does not check for or mention git as a dependency
  • claude doctor should detect missing git and report it
  • This is especially common on minimal server/VPS images that ship without git

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗