Make claude config set vs. add less footgunny

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 7 comments · opened Mar 5, 2025 · closed Mar 15, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Setting the config option "ignorePatterns" breaks the internal file tooling. I set this option to "deprecated/**" to exclude this directory and all file access broke. Took me 2 days to track it back to this configuration option.

Also, the config reports this config as an array, but there is no documentation on how to set multiple patterns. This setting needs a little TLC to prevent the break.

claude is incredible btw, Thanks for the great work!

View original on GitHub ↗

7 Comments

bcherny collaborator · 1 year ago

Hi! Docs are here: https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#project-configuration

Setting the config option "ignorePatterns" breaks the internal file tooling.

Can you tell me more about this? Would love to understand what you mean by "breaks".

bcherny collaborator · 1 year ago

Closing for inactivity. Feel free to re-open.

bitslip6 · 1 year ago

I read the documentation, but there is no information on how to set more than 1 directory or path in the ignorePatterns setting. is it colon separated, comma separated, space separated, etc?

More detail on how claude breaks. Whenever I set this value (for example, to a directory in my project), claude becomes unable to read or write any file in any directory in my project, and attempts to falling back to using command line tools (grep, cat, sed, awk, etc) for file access and modification.

bcherny collaborator · 1 year ago

You add one at a time, per the docs. We could add a way to add a few dirs at once if helpful.

Can you paste the contents of claude config list?

bitslip6 · 1 year ago

Okay, so reviewing the documentation, which looks like it might have been updated recently (or I'm possibly just bad at reading), it looks like I was using "config set" instead of "config add". Using "config set", leaves ignorePatterns set to a string, and "config add" leaves this variable an array or list. So, probably somewhere in the read/write internal tooling, it's not handling the string/array difference correctly. This bug is pretty easy to replicate and leaves claude in an unusable state. preventing "claude config set ignorePatterns ..." from succeeding would probably be sufficient to prevent most occurrences.

Thanks for the great work :)

bcherny collaborator · 1 year ago

This is fixed in 0.2.42! Restart to update.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.