Why .env is not a secret in 2026
AI coding assistants index every file in your workspace so they can answer questions like "why did this build fail?". That index includes `.env`. In practice, your Stripe key or database password will appear in tool_result blocks, session transcripts, completion suggestions, and anything that gets logged.
The traditional advice — `.gitignore` the file — only stops the secret from reaching GitHub. It does nothing about the LLM context window.