continuedev / continuedev/continue

grep_search tool returns no results on Windows due to backslash path separator in ripgrep output

Open Beginner friendly
#13,027 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Before submitting your bug report
Relevant environment info
- OS: Windows 7
- Continue version: v2.0.0
- IDE version: VSCodium 1.116.02821
- Model: Unsloth Studio Local
Description

The grep_search agent tool always returns "The search returned no results" on Windows, even when ripgrep finds matches. If I use Process Monitor to catch rg.exe being run, and run it manually, I get search results. If I search the same string in VSCode I also get search results.

The bug is in core/util/grepSearch.ts in formatGrepSearchResults. The parser checks for file header lines using:

if (line.startsWith("./") || line === "--") {

On Windows, ripgrep outputs paths with backslashes (.\templates\foo\bar.tpl) instead of forward slashes (./templates/foo/bar.tpl). The startsWith("./") check never matches, so numResults stays 0 and all results are silently discarded despite the content being present.

I added || line.startsWith(".\\") to this check, and now I get the search results I expect.

To reproduce
  1. Ask the agent to search for a string that exists in the codebase using the grep_search tool
  2. Observe "The search returned no results" even though the string is present
Log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in core/util/grepSearch.ts and inspect formatGrepSearchResults, especially how it identifies ripgrep file-header lines. Reproduce the grep_search call on Windows or with backslash-separated paths, then verify that matching results are retained and no longer reported as empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.