Unintended Debug Logging Triggered by .env File

Resolved 💬 5 comments Opened Mar 5, 2025 by stevenlafl Closed Mar 25, 2025

Bug Description
If a .env file in the location where you run claude contains "DEBUG=true" then it causes Anthropic HTTP requests to be visible with debug information. That behavior is not desired.

Environment Info

  • Platform: linux
  • Terminal: konsole
  • Version: 0.2.31
  • Feedback ID: 819d6c2b-c9cc-40c2-90c5-931ed7ce0d15

I understand there is a .claudeignore or claude config add ignorePatterns .env but this prevents that data from being loaded into Claude, not prevent the CLI from reading it.

If possible, perhaps Claude's dotenv should not load the DEBUG variable and instead defer that to a command-line argument if it is desired.

View original on GitHub ↗

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