[BUG] .claude/settings.json not applying ignorePatterns
Resolved 💬 5 comments Opened Apr 28, 2025 by ad8e Closed May 28, 2025
Environment
- Platform (select one):
- [+] Anthropic API
- Claude CLI version: 0.2.86 (Claude Code)
- Operating System: Ubuntu 24.04
- Terminal: bash
Bug Description
Claude can see files I put in ignorePatterns in .claude/settings.json.
Steps to Reproduce
- I create some files in the folder
tests/. - I created
.claude/settings.jsonwith these contents:
{
"ignorePatterns": [
"tests/**"
]
}
- I open claude code and ask it to list the files in
tests. It can do so, seeing 7 files. - If I use
claude config set ignorePatterns "tests/**", then claude is no longer able to see the files in that folder.
Expected Behavior
I expect it to be unable to list files after step 2.
Additional Context
Could be user error, but I see no way to add configs to the "shared project permissions" through the command line. I'm editing this settings file because https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#permission-rules lists .claude/settings.json as a valid location.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗