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.
Description:
Environment variables defined in the env section of .claude/settings.json are not available when executing Bash
commands on Windows.
Steps to Reproduce:
{
"env": {
"AZURE_DEVOPS_PROJECT": "MDaemon10"
}
}
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:
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.