[BUG] kubectl command patterns not matching despite correct allow rules

Resolved 💬 5 comments Opened Aug 29, 2025 by tuxpeople Closed Jan 5, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.96
  • Operating System: macOS (Darwin 24.6.0)
  • Terminal: Bash in VSCode

## Bug Description
kubectl command patterns in .claude/settings.local.json allow rules are not matching despite correct wildcard syntax. Commands that should be automatically
allowed are still prompting for user permission.

## Steps to Reproduce

  1. Add kubectl patterns to .claude/settings.local.json allow rules:

``json
"allow": [
"Bash(kubectl *get*)",
"Bash(kubectl *logs*)",
"Bash(kubectl *describe*)"
]
``

  1. Execute simple kubectl commands like:
  • kubectl get pods
  • kubectl -n system-upgrade logs podname
  • kubectl get nodes
  1. Observe permission prompts appear

## Expected Behavior

Commands matching the wildcard patterns should execute automatically without permission prompts. For example:

  • kubectl get pods should match Bash(kubectl get)
  • kubectl logs podname should match Bash(kubectl logs)

## Actual Behavior

All kubectl commands prompt for user permission despite having matching allow patterns configured.

## Additional Context

  • Even the simplest kubectl get pods command triggers permission prompt
  • The patterns appear syntactically correct based on documentation
  • Other bash command patterns in the allow list work correctly
  • Workaround: Using broader pattern like Bash(kubectl*) might work but reduces granular control
  • This affects kubectl debugging workflows significantly in Kubernetes environments

View original on GitHub ↗

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