IssueRaiser

[MODEL] Frequently uses Bash tools (sed/grep/etc) when use-case is well aligned to other builtin tools (Read/Grep/etc)

### Preflight Checklist - [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Amodel) for similar behavior reports - [x] This report does NOT contain sensitive information (API keys, passwords, etc.) ### Type of Behavior Issue Other unexpected behavior ### What You Asked Claude to Do See attached (redacted, and line-wrapped for readability) for a full exchange analyzing occurrences based on claude/agent logs. The analysis ran afoul of some of the same issues being analyzed. [claude.cat-sed-grep.txt](https://github.com/user-attachments/files/24756859/claude.cat-sed-grep.txt) ### What Claude Actually Did I frequently see Bash tool permission requests invocations just like the following: ```sh # Output lines 147-162 from a given file. sed -n 147,162p /path/to/some/file # Search for a pattern in a directory. grep -r "^some pattern$" /path/to/some/dir # Write a file from content expressed via heredoc. cat > file.txt <<EOF ... EOF ``` Often these are just solitary commands (not as part of a pipeline). Sometimes, e.g. grep, might be piped to `head`. Sometimes these `&&`'d commands like: ```sh cat > file.py <<EOF ... EOF && chmod +x file.py && ./file.py ``` ### Expected Behavior All of the above examples are undesirable. These cases should broadly use the `Read`, `Grep` (builtin, **not** `Bash(grep)`), and `Write`/`Edit`. The `&&`'d example above ideally should use `Write` followed by `Bash` tool

Posted by extemporalgenome on Jan 21, 2026, 5:23 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Software)

[MODEL] Frequently uses Bash tools (sed/grep/etc) when use-case is well aligned to other builtin tools (Read/Grep/etc)

extemporalgenomeJan 21, 2026, 5:23 AM

### Preflight Checklist - [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Amodel) for similar behavior reports - [x] This report does NOT contain sensitive information (API keys, passwords, etc.) ### Type of Behavior Issue Other unexpected behavior ### What You Asked Claude to Do See attached (redacted, and line-wrapped for readability) for a full exchange analyzing occurrences based on claude/agent logs. The analysis ran afoul of some of the same issues being analyzed. [claude.cat-sed-grep.txt](https://github.com/user-attachments/files/24756859/claude.cat-sed-grep.txt) ### What Claude Actually Did I frequently see Bash tool permission requests invocations just like the following: ```sh # Output lines 147-162 from a given file. sed -n 147,162p /path/to/some/file # Search for a pattern in a directory. grep -r "^some pattern$" /path/to/some/dir # Write a file from content expressed via heredoc. cat > file.txt <<EOF ... EOF ``` Often these are just solitary commands (not as part of a pipeline). Sometimes, e.g. grep, might be piped to `head`. Sometimes these `&&`'d commands like: ```sh cat > file.py <<EOF ... EOF && chmod +x file.py && ./file.py ``` ### Expected Behavior All of the above examples are undesirable. These cases should broadly use the `Read`, `Grep` (builtin, **not** `Bash(grep)`), and `Write`/`Edit`. The `&&`'d example above ideally should use `Write` followed by `Bash` tool

Comments (0)

No comments yet. Start the discussion.

Comment on this issue