[DOCS] Tools reference omits `grep`/`egrep`/`fgrep` as read-before-edit views
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/tools-reference
Section/Topic
Edit tool behavior → read-before-edit requirement
Current Documentation
The docs currently say:
Three checks must pass for an edit to apply: * Read-before-edit: Claude must have read the file in the current conversation, and the file must not have changed on disk since that read. This check runs first, before any string matching. ... Viewing a file with Bash also satisfies the read-before-edit requirement when the command iscat,head,tail, orsed -n 'X,Yp'on a single file with no pipes, redirects, or other flags. Piped output and other Bash commands do not count, and Claude must use Read before editing in those cases.
What's Wrong or Missing?
This section is outdated as of v2.1.160. The v2.1.160 changelog says Claude Code now accepts single-file grep/egrep/fgrep commands as satisfying the read-before-edit check, but the Edit tool behavior section still lists only cat, head, tail, and sed -n 'X,Yp'.
That mismatch makes the current rule incomplete and can lead readers to believe a separate Read is still required after a single-file grep/egrep/fgrep view.
Suggested Improvement
Update the Edit tool behavior section to include the new v2.1.160 behavior explicitly. For example, revise the Bash-view sentence to mention that single-file grep, egrep, and fgrep commands also satisfy read-before-edit when used without pipes, redirects, or multi-file targets.
If there are edge cases (for example, line-number flags allowed but recursive or multi-file searches excluded), document those limits in the same paragraph so the rule is unambiguous.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/tools-reference | 130-136 | Edit tool read-before-edit rules still enumerate only cat, head, tail, and sed -n |
| https://code.claude.com/docs/en/changelog | 13-16 | v2.1.160 changelog says single-file grep/egrep/fgrep now satisfy the read-before-edit check |
Total scope: 2 pages affected
The same page's Write section already says its Bash-view behavior follows the rules in Edit tool behavior, so updating the Edit section should also clarify the inherited rule for writes.
3 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Issue #64641 Verification
Title: [DOCS] Tools reference omits
grep/egrep/fgrepas read-before-edit viewsIssue Date: June 2, 2026
Verification Date: 2026-06-23
Status: RESOLVED
---
Issue Summary
This issue reports that the
Edit tool behaviorsection of the tools-reference page (https://code.claude.com/docs/en/tools-reference) is outdated as of v2.1.160. The v2.1.160 changelog entry states that single-filegrep/egrep/fgrepcommands now satisfy the read-before-edit check, but the docs page still listed onlycat,head,tail, andsed -n 'X,Yp', creating a mismatch.---
Verification Results
Claim 1: The
Edit tool behaviorsection omitsgrep/egrep/fgrepfrom the Bash-view list of read-before-edit commandsStatus: RESOLVED
At https://code.claude.com/docs/en/tools-reference, line 135:
The current docs explicitly include
grep,egrep, andfgrepalongsidecat,head,tail, andsed -n 'X,Yp', with the same single-file / no-pipes / no-redirects constraint called out in the issue's suggested wording. The follow-up sentence at line 137 also notes thategrepandfgrepcount for read-before-edit even though they are not checked against Read deny rules, which addresses the "edge cases" the issue asked to document.Verdict: The current wording matches what the issue requested; the omission has been corrected.
---
Claim 2: The v2.1.160 changelog says single-file
grep/egrep/fgrepsatisfy read-before-editStatus: RESOLVED
At https://code.claude.com/docs/en/changelog, line 396 (under the
2.1.160entry dated June 2, 2026):This matches the claim and remains in the changelog.
Verdict: The changelog entry exists; the doc page now mirrors its content.
---
Current State
| Claim | Status |
|-------|--------|
|
Edit tool behaviorsection listsgrep/egrep/fgrepas read-before-edit views | RESOLVED || v2.1.160 changelog records the same behavior | RESOLVED |
---
Suggested Fix
N/A - issue has been resolved.
---
References
grep,egrep, andfgrep; line 137 documents the read-before-edit vs deny-rule distinction---
Conclusion & Recommendation
Primary Concern: The tools-reference page did not reflect v2.1.160's expansion of the read-before-edit Bash-view list to include single-file
grep/egrep/fgrep.Resolution Status: RESOLVED
Recommendation: CLOSE
Both the tools-reference page (line 135) and the changelog (line 396) now consistently document that single-file
grep,egrep, andfgrepcommands without pipes or redirects satisfy the read-before-edit check.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.