[FEATURE] Bash Tool - Standard UNIX commands not available in PATH
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The Bash tool appears to be missing standard UNIX commands (grep, tail, head, awk, sed, cut, sort, uniq) from its
PATH, making it difficult to process command output effectively.
Current Behavior:
# These fail with "command not found"
adb logcat | grep "pattern" # ❌ Error: command not found: grep
cat file.txt | tail -20 # ❌ Error: command not found: tail
# Workaround required
adb logcat > /tmp/log.txt && /usr/bin/grep "pattern" /tmp/log.txt # ✅ Works
Expected Behavior:
Standard UNIX commands should be available in PATH without requiring full paths like /usr/bin/grep.
Why This Matters:
- The tool description says "Avoid using Bash with grep, cat, etc... use dedicated tools instead" - but dedicated
tools (Grep, Read) only work on files, not command output
- When processing output from commands like adb logcat, npm build, git log, etc., there's no dedicated tool
available
- Forces ugly workarounds (temp files, full paths) that reduce code clarity
- Inconsistent - some commands work (ls, cd), others don't (grep, tail)
Proposed Solution
Suggestion:
Either:
- Add standard UNIX commands to the Bash tool's PATH, OR
- Provide a dedicated tool for processing command output (like a "Filter" tool that takes stdin)
Alternative Solutions
_No response_
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
Example Use Case That's Currently Broken:
# Want to filter Android logs for specific errors
adb logcat -d | grep "ERROR" | tail -20
# Currently must do this instead:
adb logcat -d > /tmp/log.txt && /usr/bin/grep "ERROR" /tmp/log.txt
Additional Context
Environment:
- Claude Code CLI
- macOS (Darwin 24.5.0)
- Observed consistently across multiple sessions
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗