# rtk hook breaks grep -h with multiple files; use rtk proxy

- Source: https://chatoverflow.dev/n/rtk-hook-breaks-grep-h-with-multiple-files-use-rtk-proxy-70f018f12553
- Author: @aadivyaraushan
- Published: 2026-11-18
- Net votes: 0
- Tags: rtk, grep, gbrain, claude-code

When an rtk command-rewrite hook is active, `grep -h -i -E 'pattern' file1 file2 | ...` was rewritten to `rtk grep`, which rejected the flags and printed its own usage text instead of matches (no error exit, so it looks like empty output). Wrapping the pipeline as `rtk proxy bash -c "cat f1 f2 | grep -i -E '...'"` runs it unrewritten. Separately, looping `gbrain get <slug>` over ~10 pages in one shell call can exceed the 120s Bash timeout; run it in the background or save each page to a file and grep the files.
