[BUG] Claude Code(terminal) v2.1.76 fails globally with "--print" error on macOS after directory rename

Resolved 💬 7 comments Opened Mar 14, 2026 by Emerging-Disintegration Closed Apr 17, 2026

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 v2.1.76 fails to launch with the error "Input must be provided either through stdin or as a prompt argument when using --print" on macOS. The error began immediately after allowing Claude to rename the parent directory of a project from Software-Projects to software_projects. After attempting to fix the issue, the error now occurs:

  • In any directory (git or non-git)
  • After clean reinstalls using both the recommended installer and Homebrew
  • Regardless of environment configuration
  • Despite no --print flag being used

Environment

OS: macOS (Apple Silicon, M1/M2/M3)
Claude Code Version: 2.1.76 (latest)
Installation Method: Homebrew (brew install claude-code)
Terminal: zsh
Shell Config: No aliases, no environment variables set for Claude Code

Attempted fixes (all failed):

  • Cleaned ~/.claude.json of stale cached paths
  • Renamed ~/.claude/projects/ entries to match the new directory path
  • Nuked ~/.claude/projects/ entirely
  • Uninstalled and reinstalled using the recommended method from docs: curl -fsSL https://claude.ai/install.sh | sh
  • Reinstalled using Homebrew: brew install claude-code (clean install)
  • Made a fresh test directory, ran git init, then ran claude in the terminal
  • Verified environment
  • No aliases: type claude shows /opt/homebrew/Caskroom/claude-code/2.1.76/claude
  • No shell config: grep -r "claude" ~/.zshrc ~/.zprofile ~/.zshenv returns nothing
  • No environment variables: env | grep -i claude returns nothing
  • No project-level settings: .claude/settings.json and .claude/settings.local.json don't exist

Commands that DO work

```bashclaude --version # Returns: 2.1.76
claude doctor # Renders interactive UI and responds to input

### Commands that DON'T work
```bash
claude              # Fails with --print error
claude chat         # Fails with --print error (was briefly working, then broke)

Related Issues

This appears related to (but distinct from):

#23195 — Non-git directory bug (but this fails WITH git too)
#6820 — --print assumption bug
#29293 — Agent Teams --print spawning issue

However, this bug is:

Global (affects all directories)
Not directory-specific (not just non-git)
Not config-related (persists after cache cleans)
Fresh-install reproducible (happens immediately after Homebrew install)

What Should Happen?

Claude code should start in the terminal after entering the 'claude' command.

Error Messages/Logs

Input must be provided either through stdin or as a prompt argument when using --print

Steps to Reproduce

Reproduction Steps
How the bug started:

Had a project directory at /Users/book/Software Projects /wallStBookie/ (working fine)
Allowed Claude Code to Rename the parent directory from Software Projects to software_projects
Ran Claude Code in the new project directory
Got the --print error immediately
Claude chat briefly worked but broke when trying to send a message

Claude Model

Opus

Is this a regression?

Unsure

Last Working Version

2.1.76

Claude Code Version

2.1.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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