Skip to content

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

Description

@DigitalCyberSoft

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on LinuxstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions