grep_search tool returns no results on Windows due to backslash path separator in ripgrep output
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- tooling
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.
Description
Before submitting your bug report
- I've tried finding an answer on the Continue docs site
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
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
- Ask the agent to search for a string that exists in the codebase using the grep_search tool
- Observe "The search returned no results" even though the string is present
Log output
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from continuedev/continue
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
continuedev/continue#13291 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
continuedev/continue#13254 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
continuedev/continue#13233 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
continuedev/continue#13198 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
continuedev/continue#13197 ·
All issues in continuedev/continue
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·