[BUG] permissions strings matching is broken claude prompts for permission repeatedly

Resolved 💬 1 comment Opened May 7, 2026 by larbillaqp Closed Jun 5, 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?

I researched the issue and even ask Claude to debug it to no avail.

Claude itself wrote: "Sorry for the frustration — the prompts during the forensic report were disruptive and the permission system clearly isn't behaving as documented. "

  • Command form: PGPASSWORD=$PGPASSWORD_DI psql -h localhost -p $PORT_DI -U postgres -d ...
  • Patterns tried that failed: Bash(PGPASSWORD), Bash(PGPASSWORD=), Bash( psql )
  • Expected: no prompt; Actual: prompted every time
  • Version: 2.1.129

What Should Happen?

The Bash commands being used should match the permissions in the global settings.json file and Claude shouldn't ask for permissions over and over.

Error Messages/Logs

Steps to Reproduce

Add a permission of the form described above to the global settings.json file
Create a runbook with a command like I posted above.
Observe claude asking for permission

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.129

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗