You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error handling for Ripgrep binary download in offline environments #21646
Description
When using the Glob tool in an offline environment where ripgrep is not pre-installed, the agent fails with an confusing error message in the TUI:
✱ Glob "xxxx.ts"
Unable to connect. Is the computer able to access the url?
Root Cause
The message is confusing for both users and the LLM. Based on the source code, the root cause is an unhandled exception thrown by the fetch call when it attempts to download the ripgrep binary from GitHub. Currently, the raw network exception from the runtime (Bun) is being bubbled up directly to the UI.
Proposed Solution
Adding a proper .catch() handler around the fetch call responsible for downloading the binary to capture the network exception.
Log the specific target URL that failed to download for debugging purposes.
Throw the existing error RipgrepDownloadFailedError.
Expected Behavior
After the fix, the user (and the LLM) should see a more descriptive error:
✱ Glob "xxxx.ts"
RipgrepDownloadFailedError
Why this is better
This error information allows the LLM to make better decisions for its next step—such as attempting a retry, switching to a different tool, or informing the user to install ripgrep manually.
Activity
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.