[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
- Create a directory with an
.envfile containingAPP_NAME="test-app-name" - Navigate to that directory in terminal
- Run
claudecommand - Accept the trust dialog by selecting "Yes, proceed"
- Observe that the input field displays
> mcp/mcpinstead of normal prompt - 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/mcpinstead 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_NAMEin the.envfile
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_NAMEenvironment variable - Shell: zsh
- The issue is reproducible consistently when the
.envfile containsAPP_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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗