[FEATURE] Bash Tool - Standard UNIX commands not available in PATH

Resolved 💬 3 comments Opened Oct 1, 2025 by StefanoCapezzone Closed Jan 7, 2026

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:

  1. 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

  1. When processing output from commands like adb logcat, npm build, git log, etc., there's no dedicated tool

available

  1. Forces ugly workarounds (temp files, full paths) that reduce code clarity
  2. Inconsistent - some commands work (ls, cd), others don't (grep, tail)

Proposed Solution

Suggestion:
Either:

  1. Add standard UNIX commands to the Bash tool's PATH, OR
  2. 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗