hermes - 💡(How to fix) Fix [Bug]: search_files times out on WSL when ripgrep is missing [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

search_files times out on WSL when rg (ripgrep) isn't installed. The internal timeout marker leaks into user-facing results, producing the cryptic downstream error "Model returned empty after tool calls".

  • Give a clear, actionable error: "ripgrep not found. Install with sudo apt install ripgrep or use an alternative search tool for WSL /mnt paths" The timeout marker [Command timed out after 60s] then leaks into the result pagination logic as if it were a filename, producing the cryptic downstream error "Model returned empty after tool calls".

Root Cause

The bug is in tools/file_operations.py around line 1593. search_files checks for rg (ripgrep), and when missing falls back to GNU find (line 1615) with a single-threaded tree walk. On WSL2, when the search path is under /mnt/c/, the filesystem goes through the Plan 9 translation layer (9P2000.L protocol) — orders of magnitude slower than native Linux. With a 60s internal timeout (_exec(cmd, timeout=60) at line 1618), large directory trees time out reliably.

The timeout marker [Command timed out after 60s] then leaks into the result pagination logic as if it were a filename, producing the cryptic downstream error "Model returned empty after tool calls".

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

No response given for required fields — see body below

Bug Description

search_files times out on WSL when rg (ripgrep) isn't installed. The internal timeout marker leaks into user-facing results, producing the cryptic downstream error "Model returned empty after tool calls".

Steps to Reproduce

  1. Run Hermes on WSL2 without ripgrep installed
  2. Call search_files(pattern="something", path="/mnt/c/Users/") against a directory of any size
  3. After ~60s, get [Command timed out after 60s] leaked into the result set
  4. The model receives a garbled tool result and produces "Model returned empty after tool calls"

Expected Behavior

Either:

  • Auto-install ripgrep when missing (via apt/pip)
  • Use a Python-native fast search with a meaningful progress indicator
  • Give a clear, actionable error: "ripgrep not found. Install with sudo apt install ripgrep or use an alternative search tool for WSL /mnt paths"

Actual Behavior

Silently falls back to GNU find which runs single-threaded through the WSL9P/Plan 9 filesystem translation layer. /mnt/ paths are especially slow — orders of magnitude slower than native Linux FS. The 60s timeout fires. The timeout string leaks as a pseudo-result.

Affected Component

  • Tools (terminal, file ops, web, code execution, etc.)
  • CLI (interactive chat)

Debug Report

Report https://paste.rs/9KSxw agent.log https://paste.rs/sCssI gateway.log https://paste.rs/nFrGG

Operating System

Windows 10 with WSL2 (Ubuntu 26.04)

Python Version

3.11.15

Hermes Version

v0.14.0 (2026.5.16)

Root Cause Analysis

The bug is in tools/file_operations.py around line 1593. search_files checks for rg (ripgrep), and when missing falls back to GNU find (line 1615) with a single-threaded tree walk. On WSL2, when the search path is under /mnt/c/, the filesystem goes through the Plan 9 translation layer (9P2000.L protocol) — orders of magnitude slower than native Linux. With a 60s internal timeout (_exec(cmd, timeout=60) at line 1618), large directory trees time out reliably.

The timeout marker [Command timed out after 60s] then leaks into the result pagination logic as if it were a filename, producing the cryptic downstream error "Model returned empty after tool calls".

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING