[BUG] PermissionRequest hook `permission_suggestions` inconsistencies with UI
Resolved 💬 4 comments Opened Feb 25, 2026 by Crazytieguy Closed Mar 27, 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?
While testing PermissionRequest hooks, I found two cases where the permission suggestions shown in the UI don't match the permission_suggestions data in the hook input:
1. git add -A && git stash
git addis already allowed,git stashis not- Hook input correctly suggests
git stash - UI shows "don't ask again for: git add:*" (wrong command)
2. bash -c "echo hello"
- UI shows "don't ask again for: bash:*" (wildcard prefix)
- Hook input suggests the exact command:
bash -c "echo hello"(no wildcard)
What Should Happen?
Use the same algorithm for permission_suggestions in the hook and the actual permission suggestions in the ui.
Error Messages/Logs
Steps to Reproduce
- Add a PermissionRequest hook to
.claude/settings.jsonthat dumps stdin to a file:
{
"hooks": {
"PermissionRequest": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "bash -c 'cat >> /tmp/permission-request-debug.jsonl'",
"timeout": 5
}]
}]
}
}
- Set up permissions where
git addis allowed butgit stashis not (e.g. viaBash(git add *)in allow list)
- Run
git add -A && git stash— UI suggests "git add:*", hook data suggests "git stash"
- Run
bash -c "echo hello"— UI suggests "bash:*", hook data suggests exact commandbash -c "echo hello"
- Compare UI suggestions with
permission_suggestionsin/tmp/permission-request-debug.jsonl
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.55
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗