[BUG] APP_NAME in .env file breaks Claude Code terminal input

Resolved 💬 3 comments Opened Jul 25, 2025 by thisisdev-patrick Closed Jan 4, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other:
  • Claude CLI version: 1.0.60 (Claude Code)
  • Operating System: macOS (based on /Volumes/Dev/ path structure)
  • Terminal: zsh (tested on iTerm2, WezTerm, and Alacritty)

Bug Description

Claude Code terminal becomes unresponsive and displays incorrect input when an .env file contains an APP_NAME variable. The input field shows > mcp/mcp instead of the normal prompt, and commands are not recognized or executed.

Steps to Reproduce

  1. Create a directory with an .env file containing APP_NAME="test-app-name"
  2. Navigate to that directory in terminal
  3. Run claude command
  4. Accept the trust dialog by selecting "Yes, proceed"
  5. Observe that the input field displays > mcp/mcp instead of normal prompt
  6. Try to enter any command - input is not recognized

Expected Behavior

Claude Code should start normally with a functional command prompt, regardless of the presence of an .env file with APP_NAME variable. The input field should accept and execute commands as usual.

Actual Behavior

  • The input field shows > mcp/mcp instead of the expected prompt
  • Commands cannot be entered or executed
  • The terminal interface becomes non-functional for command input
  • The issue appears to be related to the presence of APP_NAME in the .env file

Additional Context

Environment file contents:

APP_NAME="test-app-name"

Terminal output showing the issue:

❯ claude
# [Trust dialog appears and is accepted]
╭─────────────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                                   │
│                                                             │
│   /help for help, /status for your current setup            │
│                                                             │
│   cwd: /Volumes/Dev/xxx/xxx/test  │
╰─────────────────────────────────────────────────────────────╯

# [Tips section appears normally]

╭────────────────────────────────────────────────────────────╮
│ > /mcp                                                     │
│                                                            │
│ [Input field is unresponsive]                              │
╰────────────────────────────────────────────────────────────╯

Additional notes:

  • The issue seems to be specific to the APP_NAME environment variable
  • Shell: zsh
  • The issue is reproducible consistently when the .env file contains APP_NAME
  • Cross-terminal testing: Issue confirmed across multiple terminal applications:
  • iTerm2
  • WezTerm
  • Alacritty
  • This indicates the bug is in Claude Code itself, not terminal-specific

View original on GitHub ↗

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