Bash tool: ZodError in permission system blocks git commands
Resolved 💬 2 comments Opened Feb 27, 2026 by GeorgeGkinis Closed Feb 28, 2026
Description
The Bash tool fails with a ZodError when attempting to run git add or git commit commands. The permission prompt never appears — the tool call is rejected immediately with an internal validation error.
Error
Tool permission request failed: ZodError: [
{
"code": "invalid_union",
"errors": [
[
{
"expected": "array",
"code": "invalid_type",
"path": ["updatedPermissions", 0, "rules"],
"message": "Invalid input: expected array, received undefined"
},
{
"code": "invalid_value",
"values": ["allow", "deny", "ask"],
"path": ["updatedPermissions", 0, "behavior"],
"message": "Invalid option: expected one of \"allow\"|\"deny\"|\"ask\""
}
],
[
{
"code": "invalid_value",
"values": ["deny"],
"path": ["behavior"],
"message": "Invalid input: expected \"deny\""
},
{
"expected": "string",
"code": "invalid_type",
"path": ["message"],
"message": "Invalid input: expected string, received undefined"
}
]
],
"path": [],
"message": "Invalid input"
}
]
Reproduction
- Start a Claude Code session in a git repository
- Have the agent attempt to run
git add <files>via the Bash tool - The permission request fails with the ZodError above — no prompt is shown to the user
- Retrying the same command produces the same error consistently
- Other Bash commands (e.g.,
cargo check,cargo test) work fine in the same session
Expected behavior
The permission prompt should appear, allowing the user to approve or deny the git command.
Environment
- Platform: Linux (Ubuntu, kernel 6.17)
- Claude Code model: claude-opus-4-6
- The error persists across multiple attempts in the same session
- Non-git Bash commands work fine (e.g.,
cargo build,cargo test)
Workaround
Run git commands manually in a separate terminal.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗