[BUG] Agents don't respect CLAUDE.md tool usage rules - use bash commands instead of specialized tools

Resolved 💬 3 comments Opened Oct 21, 2025 by IS-PatrickSmith Closed Oct 25, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the Task tool to launch specialized agents, the agents do not consistently follow the tool usage rules defined in the user's CLAUDE.md configuration file.

Expected Behavior:
Agents launched via the Task tool should follow all rules defined in CLAUDE.md, specifically:

  • Use Glob instead of bash find
  • Use Grep instead of bash grep/rg
  • Use Read instead of bash cat/head/tail
  • Use Edit instead of bash sed/awk

The CLAUDE.md explicitly states: "This rule applies to ALL agents and ALL situations without exception"

Actual Behavior:
Agents use bash commands like find which then trigger approval requests, even though:

  1. The specialized tools (Glob, Grep, Read, Edit) don't require approval
  2. The CLAUDE.md clearly prohibits using these bash commands
  3. The rules explicitly state they apply to all agents

Impact:

  • Agents require unnecessary user approvals
  • Inconsistent behavior between main conversation and agent tasks
  • Reduced efficiency when agents are used
  • User configuration rules are not respected by agents

Reproduction:

  1. Add tool usage rules to CLAUDE.md prohibiting bash find/grep/cat/etc
  2. Launch any agent using the Task tool
  3. Agent uses bash commands instead of specialized tools
  4. System requests approval despite rules

Suggested Fix:
Ensure all agents inherit and respect CLAUDE.md configuration rules, particularly tool usage policies.

What Should Happen?

Agents launched via the Task tool should follow all rules defined in CLAUDE.md, specifically:

  • Use Glob instead of bash find
  • Use Grep instead of bash grep/rg
  • Use Read instead of bash cat/head/tail
  • Use Edit instead of bash sed/awk

Error Messages/Logs

Steps to Reproduce

Reproduction:

  1. Add tool usage rules to CLAUDE.md prohibiting bash find/grep/cat/etc
  2. Launch any agent using the Task tool
  3. Agent uses bash commands instead of specialized tools
  4. System requests approval despite rules

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.24

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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