[BUG] --allowedTools ignored, and claude not able to use tools
Resolved 💬 3 comments Opened May 13, 2025 by gwpl Closed May 13, 2025
despite I call --allowedTools, before and after flags and never works:
claude \
--output-format stream-json \
--allowedTools "Bash(*)" Edit Write Replace Agent Glob Grep LS Read \
-p \
"$@"
returns "Please grant permission to the Bash tool so I can rename your branch." , but I already granted it!
(...)
{"id":"msg_0122x3dYEgjdfLE9CTcAtH1E","type":"message","role":"assistant","model":"claude-3-7-sonnet-20250219","content":[{"type":"text","text":"I need permission to run Git commands. Please grant permission to the Bash tool so I can rename your branch."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":7,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"output_tokens":27}}
{"role":"system","cost_usd":0.0030848000000000004,"duration_ms":10036,"duration_api_ms":10052,"result":"I need permission to run Git commands. Please grant permission to the Bash tool so I can rename your branch.","session_id":"2b283b10-46b8-40dc-b489-952b32fed673"}
tested on Linux with :
$ claude -v
0.2.107 (Claude Code)
Potentially related issues:
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗