[BUG] globally defined `allowedTools` don't work the first time a path is opened

Resolved 💬 2 comments Opened May 17, 2025 by max-sixty Closed May 31, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: <!-- output of claude --version --> 0.2.115 (Claude Code)
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 --> macOS
  • Terminal: <!-- e.g. iTerm2, Terminal App --> Alacritty

Bug Description

claude doesn't add globally defined allowedTools the _first time_ that claude is opened in a path

(edit: nor tools defined in a repo-level .claude/settings.local.json)

Steps to Reproduce

  1. Set some permissions in ~/.claude/settings.json
  2. Open claude in a path ~where it hasn't been opened before~ edit: I think the rule is "hasn't been opened in the path nor in a parent path"; you'll be asked Do you trust the files in this folder?
  3. run /allowed-tools
  4. nothing will be listed!
  5. exit claude
  6. open claude again (you won't be asked to confirm this time)
  7. then /allowed-tools correctly lists the permissions in ~/.claude/settings.json, as it should

View original on GitHub ↗

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