CLAUDE_CODE_USE_POWERSHELL_TOOL
Updated by Alex Sorokoletov
CLAUDE_CODE_USE_POWERSHELL_TOOL is a Claude Code environment variable: Enables a PowerShell-specific tool variant for Windows environments. This suggests the team is building first-class PowerShell support rather than routing everything through Bash — consistent with this release also disabling line-by-line streaming on Windows/WSL due to rendering issues. Added between v2.1.79 and v2.1.83 and still present in v2.1.318. It is listed in the official reference.
| Status | Present in v2.1.318 |
|---|---|
| Added | Added between v2.1.79 and v2.1.83 |
| Category | Shell and tools |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_USE_POWERSHELL_TOOL=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_USE_POWERSHELL_TOOL": "<value>"
}
}Release notes that mention it
- Claude Code v2.1.114 — Native Binary Launcher, /fewer-permission-prompts, and 20 New Environment Variables
- Claude Code v2.1.85 — 6 New Environment Variables: MCP Server Config and a 7 MB Diet
- Claude Code v2.1.84 — 6 New Environment Variables: Idle Management and Stream Resilience
- Claude Code v2.1.81 — 1 New Environment Variable: The --bare Flag and a Bug Fix Marathon
Related variables
CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES: Emit tool use summary events.CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY: Max concurrent tool executions; default 10.CLAUDE_CODE_TOOL_USE_IDCLAUDE_SDK_CAN_USE_TOOL_SHADOWEDCLAUDE_CODE_DISABLE_ADVISOR_TOOL: Disables what appears to be an internal advisory tool.CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENYCLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL: Enables the experimental Advisor Tool — a server-side tool with its own advisorModel config option.CLAUDE_CODE_PEWTER_OWL_TOOL: When set to true, it can stop certain tool results from ending the agent's turn, so the agent keeps going instead of returning control to the user.
Frequently asked questions
What does CLAUDE_CODE_USE_POWERSHELL_TOOL do?
Enables a PowerShell-specific tool variant for Windows environments. This suggests the team is building first-class PowerShell support rather than routing everything through Bash — consistent with this release also disabling line-by-line streaming on Windows/WSL due to rendering issues.
Which Claude Code version has CLAUDE_CODE_USE_POWERSHELL_TOOL?
Added between v2.1.79 and v2.1.83 and still present in v2.1.318.
How do I set CLAUDE_CODE_USE_POWERSHELL_TOOL?
Export it before starting Claude Code (export CLAUDE_CODE_USE_POWERSHELL_TOOL=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.