[BUG] Grep/Glob tools still broken on ARM64 Windows (v2.1.45) — rg.exe path leaks into regex pattern

Resolved 💬 3 comments Opened Feb 18, 2026 by moyamatthieu Closed Feb 22, 2026

Related issues

Regression of #5062 / #5189 (marked resolved in v1.0.70 but still broken on ARM64 Windows in v2.1.45).
See also #16936 (similar symptoms on other platforms, Jan 2026).

Bug description

The Grep tool returns "No matches found" for every search on any file, any pattern. The Glob tool works but leaks the binary path as a spurious first result.

Running directly in Bash reveals the root cause:

\
The full Windows path to rg.exe is injected into the regex pattern as a group. The in is parsed as an invalid hex escape by the regex engine, breaking every search.

Glob tool path leak

The Glob tool also leaks the rg.exe path as a spurious first result:

\

Steps to reproduce

  1. Install Claude Code v2.1.45 on ARM64 Windows (e.g. Surface Pro with Snapdragon)
  2. Open any project with any files
  3. Use the Grep tool to search for any pattern in any file
  4. Result: "No matches found" — 100% of the time, on every file

Expected behavior

Grep should find matches normally. The rg.exe binary path should never appear in search patterns or Glob results.

Root cause hypothesis

The path to the ripgrep binary is being concatenated into the regex pattern string as a group, instead of being used solely as the executable path. On Unix systems the path () contains no regex-special characters, so this goes unnoticed. On Windows, the backslashes in break the regex parser:

  • → invalid hexadecimal digit
  • → interpreted as bell character
  • → interpreted as newline

Environment

| Key | Value |
|-----|-------|
| Claude Code | 2.1.45 |
| OS | Windows 11 Home 10.0.26200 |
| Architecture | ARM64 |
| Node.js | v22.22.0 |
| Shell | bash (Git Bash) |
| rg.exe path | |

Impact

| Tool | Status | Detail |
|------|--------|--------|
| Grep | 100% broken | Every search silently returns "No matches found" |
| Glob | Partially broken | Works but leaks rg.exe path as spurious first result |
| Agent effectiveness | Severely degraded | Falls back to Node.js one-liners and Read tool for all code searches |

Workaround

Using Node.js scripts via the Bash tool as a replacement for Grep:

\

View original on GitHub ↗

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