Input blocked when .env file exists in working directory (fish shell)

Status Closed — not planned
Maintainer reply None cached
Activity 8 comments · opened Nov 30, 2025 · closed Jan 31, 2026

Input blocked when .env file exists in working directory

Environment

  • Claude Code version: 2.0.55
  • OS: Linux 6.14.0-116036-tuxedo
  • Terminal emulators tested: xterm, wezterm, alacritty, TTY (text-only interface)
  • Login Shell: fish (_not a problem with zsh as login shell_)

Description

When starting Claude Code in a directory containing a .env file, the input prompt becomes completely unresponsive. No text can be typed into the input field regardless of terminal emulator used.

Steps to Reproduce

  1. Create an empty .env file in any directory:

``bash
mkdir test && cd test
touch .env
``

  1. Start Claude Code:

``bash
claude
``

  1. Attempt to type anything in the input prompt

Expected Behavior

Claude Code should start normally and accept input.

Actual Behavior

The input prompt appears but entered text appears below the input box. Pressing enter moves the text into the input box, but there is now way to send a prompt.

Workaround

Move or rename the .env file before starting Claude Code:

mv .env .env.bak
claude

Or: Change the login shell to zsh (or probably to any other shell), then you can also enter a fish shell, it does not matter. Only when the login shell (changed with chsh) is set to fish, this is a problem

Troubleshooting Attempted

  • Reinstalled Claude Code (native package)
  • Reinstalled Claude Code via NPM
  • Removed all configuration in ~/.claude
  • Removed Claude JSON config file in $HOME
  • Tested multiple terminal emulators (xterm, wezterm, alacritty)
  • Tested in TTY (text-only, no graphical environment)
  • Toggled vim mode on/off
  • Added content to .env file (placeholder comment)
  • Set DOTENV_CONFIG_PATH=/dev/null before launching
  • Finally, change the login shell to zsh and there you go.

None of the above resolved the issue.

Additional Notes

  • Issue occurs with any .env file content (empty file, file with comments, file with valid variables)
  • Issue is not related to vim mode setting
  • Issue occurs in all tested terminal emulators including bare TTY

View original on GitHub ↗

8 Comments

github-actions[bot] · 10 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/4391

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

Dronakurl · 10 months ago

No, this is something different.
Even when the .env file is completely empty, I get this behaviour.

Found 1 possible duplicate issue: 1. [[BUG] APP_NAME in .env file breaks Claude Code terminal input #4391](https://github.com/anthropics/claude-code/issues/4391) This issue will be automatically closed as a duplicate in 3 days. If your issue is a duplicate, please close it and 👍 the existing issue instead To prevent auto-closure, add a comment or 👎 this comment 🤖 Generated with Claude Code
Dronakurl · 10 months ago

This is wild, it only is a problem in fish shell. So I am going back to zsh for a while

github-actions[bot] · 9 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

Dronakurl · 9 months ago

The issue is still open and really annoying

github-actions[bot] · 8 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 8 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.