[DOCS] Tools reference missing Bash `cat`/`sed -n` to `Edit` workflow guidance
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/tools-reference
Section/Topic
Bash, Read, and Edit tool behavior when Claude inspects a file with Bash before editing it
Current Documentation
The tools reference currently describes these tools separately:
|Bash| Executes shell commands in your environment. See [Bash tool behavior](#bash-tool-behavior) | Yes | |Edit| Makes targeted edits to specific files | Yes | |Read| Reads the contents of files | No |
The Bash section only documents command-process persistence:
The Bash tool runs each command in a separate process with the following persistence behavior: Working directory persists across commands. SetCLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1to reset to the project directory after each command. Environment variables do not persist. Anexportin one command will not be available in the next.
Related workflow guidance says:
* Let Claude fetch what it needs. Tell Claude to pull context itself using Bash commands, MCP tools, or by reading files.
And the permissions page says:
Read and Edit deny rules apply to Claude's built-in file tools, not to Bash subprocesses. ARead(./.env)deny rule blocks the Read tool but does not preventcat .envin Bash.
No current page explains that viewing a file with Bash cat or sed -n is enough context for a later Edit call, or that a separate Read call is no longer required.
What's Wrong or Missing?
Changelog v2.1.89 says:
ChangedEditto work on files viewed viaBashwithsed -norcat, without requiring a separateReadcall first
That is user-visible tool behavior, but the docs still make Bash file viewing and file-edit tools look unrelated.
A. Missing cross-tool behavior
No tools page documents that cat and sed -n file views can satisfy the file-context requirement for a later Edit call.
B. Missing supported command examples
The changelog names two supported Bash read patterns (cat and sed -n), but the docs do not mention them anywhere in the tool-behavior documentation.
C. Missing clarification about what changed
Because the permissions docs explicitly distinguish Read from Bash cat, advanced users cannot tell whether this v2.1.89 change affects permissions, edit eligibility, or both.
Suggested Improvement
Add a short note to tools-reference (either under Bash tool behavior or in a new Edit tool behavior subsection) such as:
When Claude inspects a file with read-only Bash commands such ascat path/to/fileorsed -n 'start,endp' path/to/file, Claude can edit that file afterward without issuing a separateReadtool call first.
Then add one clarifying sentence that this changes context tracking for edits, not the permission model: Bash commands are still governed by Bash permissions, while Read/Edit rules still apply to the built-in file tools.
If Anthropic wants this workflow to be discoverable outside the tool reference, add a brief cross-reference from the existing best-practices guidance about letting Claude fetch context with Bash commands.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/tools-reference | Primary reference for Bash, Read, and Edit tool behavior |
| https://code.claude.com/docs/en/best-practices | Tells users Claude can fetch context using Bash commands or by reading files |
| https://code.claude.com/docs/en/permissions | Explains that Read rules do not apply to Bash cat, so the cross-tool edit behavior needs clarification |
Total scope: 3 pages affected
Source: Changelog v2.1.89
Changelog entry:
ChangedEditto work on files viewed viaBashwithsed -norcat, without requiring a separateReadcall first
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗