[BUG] "Don't ask again for cd:*" silently fails — lowercase tool name rejected by settings schema

Resolved 💬 3 comments Opened Feb 24, 2026 by LumenPrima Closed Feb 28, 2026

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:

  1. The UI should generate the correctly-cased permission string (e.g. Bash(cd:*) which passes validation), or
  2. The schema should accept lowercase command prefixes for Bash sub-command patterns like cd:*, or
  3. At minimum, the user should see an error message when the save fails

Steps to Reproduce

  1. Run any compound command starting with cd, e.g. cd /c/Users/me/project && git status
  2. When prompted, select **"Yes, and don't ask again for: cd:"*
  3. Run another command starting with cd
  4. Permission prompt appears again (it was never saved)
  5. Check ~/.claude/settings.json — no cd:* 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗