claude-code - 💡(How to fix) Fix [Improvement] Remove the `find /` advisory from the Bash tool description [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56475Fetched 2026-05-06 06:27:04
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2
RAW_BUFFERClick to expand / collapse

What

The Bash tool description in the Claude Code system prompt currently includes:

When running find, search from . (or a specific path), not / — scanning the full filesystem can exhaust system resources on large trees.

I'd like to suggest removing this line.

Why

1. Empirically, Claude ignores it. Searching my own session transcripts I found Claude reaching for find / regularly when hunting for a file whose location is unknown — find / -name phela-fix.sh, find / -name 'qmllint*', find / -name "*slack_cdp*", etc. The advisory in the prompt didn't change behavior; the model treats "this file could be anywhere" as "search from /" rather than narrowing to a likely root or asking.

2. The actual cost of find / is high enough that "a soft rule the model ignores" is worse than no rule. Best case is minutes; with a spinning HDD or a network mount it's hours; with a bind loop it never terminates. A guideline in the system prompt that the model routinely violates gives users false confidence that the situation is handled, which makes them less likely to install the deterministic protection they actually need.

3. The model is not a reliable enforcer of soft prompt rules — anything that actually matters needs a hook. This is the meta-point and the reason this issue is worth filing rather than chalking up to "model didn't obey one line". Prompt rules compete with each other, with training priors (be helpful, complete the task), and with the model's underweighting of worst-case costs framed as hedges ("can exhaust system resources on large trees" reads as "only matters on big systems"). Which rules a given model honors is an emergent property of training, not something the prompt can guarantee. Treating the system prompt as best-effort guidance and pushing real safety into hooks is the right architecture; leaving soft rules in the prompt as if they were enforcement muddles that line.

4. Users who want this enforced have a better tool. A PreToolUse Bash hook is two dozen lines of bash, runs deterministically, and produces a refusal the model can act on. I just wrote one — happy to share if useful.

5. Soft rules in the system prompt that the model routinely violates are token waste with negative signal value. They train users to assume the prompt enforces things it doesn't.

Suggested change

Delete the line. If there's appetite, replace it with one example of the good form (find . -name foo) elsewhere in the prompt — concrete examples of what to do tend to beat negations of what not to do.

The deterministic version (refusal hook) belongs in user/managed settings, not in the system prompt.

extent analysis

TL;DR

Remove the advisory line from the Bash tool description in the Claude Code system prompt as it is ignored by the model and provides false confidence.

Guidance

  • The model's behavior suggests that it does not follow the advisory, making it ineffective and potentially misleading.
  • Consider replacing the line with a concrete example of the good form (find . -name foo) to provide a positive example of best practice.
  • Users who want to enforce this rule can use a PreToolUse Bash hook, which provides a deterministic solution.
  • Removing the line will help to avoid training users to assume the prompt enforces things it doesn't, and will reduce token waste with negative signal value.

Example

No code snippet is necessary in this case, as the issue is focused on the removal of a specific line from the system prompt.

Notes

The removal of the line may not address all potential issues with the model's behavior, but it is a step towards improving the clarity and effectiveness of the system prompt.

Recommendation

Apply workaround: Remove the advisory line from the Bash tool description, as it is not effective and provides false confidence. This will help to improve the clarity and effectiveness of the system prompt.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Improvement] Remove the `find /` advisory from the Bash tool description [1 participants]