Preflight Checklist
What's Wrong?
Selecting "Always Allow" for a compound Bash command (quoted path with spaces + pipe + && + .exe) writes an entry to settings.local.json, but Claude Code continues to prompt for permission on every subsequent execution.
Command that triggers the issue:
"C:/Program Files/LLVM/bin/clang.exe" -std=c11 -Wall -g trigex.c -o trigex.exe 2>&1 | tail -5 && ./trigex.exe 2>&1
This command has multiple characteristics that likely each contribute to matching failure:
- Executable path contains spaces → must be quoted with double quotes
- Contains pipe operator (
|) and output redirection (2>&1)
- Compound command chained with
&&
- Uses
.exe extension on Windows
What Should Happen?
After selecting "Always Allow" once, the same command should be auto-approved on all future executions without prompting again.
Steps to Reproduce
- Ask Claude Code to run:
"C:/Program Files/LLVM/bin/clang.exe" -std=c11 -Wall -g trigex.c -o trigex.exe 2>&1 | tail -5 && ./trigex.exe 2>&1
- When prompted, select "Always Allow"
- Verify the permission was written to
.claude/settings.local.json
- Ask Claude Code to run the exact same command again
- Observe: permission prompt appears again despite the entry in settings.local.json
Evidence
Related Issues
This report extends all three: on Windows, compound commands with a quoted .exe path and pipes are stored as literals (#21845 behavior), AND the .exe path-with-spaces matching fails (#27537 behavior), making it impossible to use "Always Allow" for any realistic compile-and-run workflow.
Error Messages/Logs
No error shown — Claude Code silently re-prompts without indication that the stored permission failed to match.
Claude Model
claude-sonnet-4-6
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.50 (Claude Code)
Platform
Anthropic API
Operating System
Windows 10 Pro (Build 10.0.19045)
Terminal/Shell
Windows Terminal / Git Bash (bash)
Additional Information
This is particularly disruptive for iterative development workflows (e.g., compile + run cycles) where the same compound command is executed many times per session. The only current workaround is manually approving every single invocation.
Preflight Checklist
What's Wrong?
Selecting "Always Allow" for a compound Bash command (quoted path with spaces + pipe + && + .exe) writes an entry to
settings.local.json, but Claude Code continues to prompt for permission on every subsequent execution.Command that triggers the issue:
This command has multiple characteristics that likely each contribute to matching failure:
|) and output redirection (2>&1)&&.exeextension on WindowsWhat Should Happen?
After selecting "Always Allow" once, the same command should be auto-approved on all future executions without prompting again.
Steps to Reproduce
.claude/settings.local.jsonEvidence
settings.local.jsonis updated after step 2 (the permission IS written — unlike [BUG] Permission "Always Allow" Selection Not Persisted - Prompts Repeat Every Execution #16762).exepath resolver expands the quoted path before pattern matching ([BUG] Bash permission pattern fails to match commands with .exe extension on Windows #27537 hypothesis)|,&&,2>&1) is not parsed consistently between storage and matchingRelated Issues
.exepattern matching fails on Windows (single command, no pipes tested)This report extends all three: on Windows, compound commands with a quoted
.exepath and pipes are stored as literals (#21845 behavior), AND the.exepath-with-spaces matching fails (#27537 behavior), making it impossible to use "Always Allow" for any realistic compile-and-run workflow.Error Messages/Logs
No error shown — Claude Code silently re-prompts without indication that the stored permission failed to match.
Claude Model
claude-sonnet-4-6
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.50 (Claude Code)
Platform
Anthropic API
Operating System
Windows 10 Pro (Build 10.0.19045)
Terminal/Shell
Windows Terminal / Git Bash (bash)
Additional Information
This is particularly disruptive for iterative development workflows (e.g., compile + run cycles) where the same compound command is executed many times per session. The only current workaround is manually approving every single invocation.