claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Allowed Tools Configuration Not Enforced in Custom Command

Open wjarka opened this issue 7 months ago • 0 comments

Bug Description Setting allowed-tools in custom-command seems not to work.

I have allowed-tools: [Bash(exec:*)] at the top of the command.md file and yet running the command asks me to accept running Bash(exec "path_to_the_script") anyway.

Environment Info

  • Platform: linux
  • Terminal: kitty
  • Version: 1.0.33
  • Feedback ID: c4c24cd7-fd8f-4aba-9397-16a1ef54dedd

Errors

[{"error":"Error: String not found in file. Failed to apply edit.\n    at AT (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1613:546)\n    at fe1 (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1613:104)\n    at Object.renderToolUseRejectedMessage (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1623:3404)\n    at xM2 (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1926:2844)\n    at iU (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:80:19803)\n    at DP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:42555)\n    at BP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38104)\n    at fq (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38032)\n    at Jw (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:37886)\n    at BC (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:34976)","timestamp":"2025-06-24T13:53:16.508Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at QF (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:1184)\n    at file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:912\n    at Array.map (<anonymous>)\n    at dK (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:903)\n    at iM2 (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1926:9268)\n    at iU (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:80:19803)\n    at DP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:42555)\n    at BP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38104)\n    at fq (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38032)\n    at Jw (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:37886)","timestamp":"2025-06-24T13:53:16.514Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at QF (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:1184)\n    at file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:912\n    at Array.map (<anonymous>)\n    at dK (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:903)\n    at iM2 (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1926:9268)\n    at iU (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:80:19803)\n    at DP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:42555)\n    at BP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38104)\n    at fq (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38032)\n    at Jw (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:37886)","timestamp":"2025-06-24T13:53:16.522Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at QF (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:1184)\n    at file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:912\n    at Array.map (<anonymous>)\n    at dK (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1472:903)\n    at iM2 (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1926:9268)\n    at iU (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:80:19803)\n    at DP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:42555)\n    at BP (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38104)\n    at fq (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:38032)\n    at Jw (file:///home/wjarka/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:82:37886)","timestamp":"2025-06-24T13:53:16.542Z"},{"error":"Error: Error opening file /home/wjarka/.claude/projects/-home-wjarka-projects-claude-toolkit/af4d20a8-f22b-42de-9281-2b02e4729f70.jsonl

Note: Error logs were truncated.

wjarka avatar Jun 24 '25 14:06 wjarka