[BUG] Claude is unable to write a working wildcard

Resolved 💬 6 comments Opened Oct 21, 2025 by fsc-eriker Closed Jan 11, 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?

In my ~/.claude/CLAUDE.md I have instsructed Claude Code to always run ~/bin/flint on new files (this is a simple utility which removes DOS carriage returns and etc) but Claude keeps on asking for permission to run this command every time I start a new session.

I asked Claude to update my~/.claude/settings.local.json to always allow this command to be run, but this seems to be impossible. Furthermore, the documentation is clearly confusing to Claude itself.

Tragicomically, its first attempt created a JSON file with hallucinated directives. I have lost the file now, but it tried something like {"allowedCommands": "~/bin/flint*"}

Subsequently, it has circled between variations of

{
  "permissions": {
    "allow": [
      "Bash(~/bin/flint:*)",
    ]
  }
}

where it tried ~/bin/flint*, ~/bin/flint *, and etc. I also tried ~/bin/flint ** but none of these work completely reliably. In the end Claude said I should report this as a bug, but also was never completely able to explain the significance of the colon or what difference it makes with one vs zero wildcards or space vs colon.

In the latest iteration, ~/bin/flint:* seemed to work for files with an absolute path, but not with files in the current directory. This in particular is something Claude wanted me to report as a new and genuine bug.

It ultimately gave up on trying to get this to work and instead tried to set up some sort of auto-approval, which however also didn't work:

{
  "permissions": {
    "allow": [
      "Read(//tmp/**)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash(~/bin/flint *)",
        "hooks": [
          {
            "type": "command",
            "command": "echo approve"
          }
        ]
      }
    ]
  }
}

I have a suspicion that there might be a conflict between the settings.local.json of the current project vs the global one, and perhaps in this particular case the correct solution to my immediate problem is to use a hook instead of "manually" instruct Claude to run something when it creates or modifies a file.

In the meantime, making instructions that Claude itself can find and understand would be a nice stopgap measure.

What Should Happen?

Claude should be able to write syntactically and semantically valid settings files. The documentation should be clearer for both Claude and human users.

Error Messages/Logs

│ Bash command                                                                 │
│                                                                              │
│   flint test_file.txt                                                        │
│   Run flint on test file                                                     │
│                                                                              │
│ Do you want to proceed?                                                      │
│ ❯ 1. Yes                                                                     │
│   2. Yes, and don't ask again for flint commands in                          │
│   /Users/me.myself.and.i/git/priv/claude                                      │
│   3. No, and tell Claude what to do differently (esc)

Steps to Reproduce

In its simplest for, "Claude, please create a ~/.claude/settings.local.json file which permits you to run flint without asking for permission"

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.24 (Claude Code)

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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