[BUG] "Don't ask again for cd:*" silently fails — lowercase tool name rejected by settings schema
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a Bash command starts with cd (e.g. cd /path && git commit ...), Claude Code prompts:
❯ 1. Yes
2. Yes, and don't ask again for: cd:*
3. No
Selecting option 2 does not persist the permission. The prompt reappears on every subsequent cd command, indefinitely.
Root cause: The permission string cd:* generated by the UI starts with a lowercase letter. The settings schema validation requires tool names to start with uppercase:
permissions.allow.1: Tool names must start with uppercase. Use "Cd:*"
Since cd:* fails validation, the write to settings.json is silently rejected and the permission never saves. The user has no indication that anything went wrong.
What Should Happen?
Either:
- The UI should generate the correctly-cased permission string (e.g.
Bash(cd:*)which passes validation), or - The schema should accept lowercase command prefixes for Bash sub-command patterns like
cd:*, or - At minimum, the user should see an error message when the save fails
Steps to Reproduce
- Run any compound command starting with
cd, e.g.cd /c/Users/me/project && git status - When prompted, select **"Yes, and don't ask again for: cd:"*
- Run another command starting with
cd - Permission prompt appears again (it was never saved)
- Check
~/.claude/settings.json— nocd:*entry was added
Workaround
Manually add the correctly-cased entry to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(cd:*)"
]
}
}
Error Messages/Logs
The validation error (only visible when attempting to write cd:* programmatically):
Settings validation failed:
- permissions.allow.1: Tool names must start with uppercase. Use "Cd:*"
Claude Model
Claude Opus 4.6
Is this a regression?
I don't know
Claude Code Version
Latest (auto-updates channel)
Platform
Anthropic API (Claude Pro)
Operating System
Windows 11 Pro
Terminal/Shell
Git Bash (MSYS2)
Additional Information
This is distinct from:
- #5710 / #27902 (permissions array overwrite bug)
- #28036 / #27407 (wrong command suggested in piped chains)
- #21080 / #24381 (general persistence issues)
Those bugs are about what gets saved or how it gets saved. This bug is about the save silently failing validation due to casing.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗