[Bug] Environment variables from .claude/settings.json not injected into Bash on Windows
Resolved 💬 3 comments Opened Jan 22, 2026 by mattmcde78 Closed Jan 26, 2026
Description:
Environment variables defined in the env section of .claude/settings.json are not available when executing Bash
commands on Windows.
Steps to Reproduce:
- Create .claude/settings.json in your project with an env section:
{
"env": {
"AZURE_DEVOPS_PROJECT": "MDaemon10"
}
}
- Ask Claude Code to check the environment variable value using Bash
- Run echo %AZURE_DEVOPS_PROJECT% (cmd) or echo $env:AZURE_DEVOPS_PROJECT (PowerShell)
Expected Behavior:
The command should output MDaemon10
Actual Behavior:
The command outputs the literal string %AZURE_DEVOPS_PROJECT% (indicating the variable is not set)
Environment:
- OS: Windows (include your version, e.g., Windows 11)
- Claude Code version: (run claude --version)
- Shell: cmd.exe / PowerShell (whichever you use)
Additional Context:
The settings file is correctly formatted and readable by Claude Code (it can read the file contents), but the
environment variables are not being passed to the shell execution context.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗