Skip to content

feat: integrate WarpGrep as alternative codebase_search backend#11891

Draft
DhruvBhatia0 wants to merge 1 commit intoRooCodeInc:mainfrom
DhruvBhatia0:feat/warpgrep-integration
Draft

feat: integrate WarpGrep as alternative codebase_search backend#11891
DhruvBhatia0 wants to merge 1 commit intoRooCodeInc:mainfrom
DhruvBhatia0:feat/warpgrep-integration

Conversation

@DhruvBhatia0
Copy link

@DhruvBhatia0 DhruvBhatia0 commented Mar 8, 2026

Summary

Adds WarpGrep as an alternative backend for the codebase_search tool. WarpGrep is an RL-trained codebase search agent that uses an agentic loop with ripgrep and file reads to find relevant code spans. Users bring their own Morph API key.

  • When WarpGrep is enabled and configured, codebase_search uses it first, falling back to the existing CodeIndexManager/Qdrant vector search if the request fails
  • Adds a WarpGrep toggle and API key field to the Code Index settings popover
  • codebase_search tool remains available in mode filtering when WarpGrep is enabled (even without CodeIndexManager configured)

Resolves #11865

Changes

File What
packages/types/src/codebase-index.ts warpGrepEnabled config + warpGrepApiKey secret schema
packages/types/src/global-settings.ts Register warpGrepApiKey in SECRET_STATE_KEYS
packages/types/src/vscode-extension-host.ts Add WarpGrep fields to webview message type
src/services/warpgrep/index.ts Core WarpGrep service — multi-turn agentic loop
src/core/tools/CodebaseSearchTool.ts WarpGrep-first execution with fallback
src/core/prompts/tools/filter-tools-for-mode.ts Keep codebase_search available when WarpGrep enabled
src/core/task/build-tools.ts Pass codebaseIndexConfig to filter settings
src/core/webview/webviewMessageHandler.ts Persist WarpGrep settings and secret status
webview-ui/src/components/chat/CodeIndexPopover.tsx WarpGrep UI section

Test plan

  • pnpm check-types — 14/14 pass
  • pnpm lint — 14/14 pass
  • All tool tests pass (349/349)
  • WarpGrep filter-tools-for-mode tests pass (2/2)
  • All filter-tools-for-mode tests pass (7/7)
  • Manual: Enable WarpGrep in Code Index settings, enter API key, verify codebase_search tool uses WarpGrep backend
  • Manual: Disable WarpGrep, verify fallback to CodeIndexManager works as before
  • Manual: With neither WarpGrep nor CodeIndexManager configured, verify codebase_search is filtered out

Interactively review PR in Roo Code Cloud

Add WarpGrep (Morph's RL-trained codebase search agent) as an
alternative backend for the codebase_search tool. Users bring their
own API key and WarpGrep runs in its own context window, performing
multi-turn ripgrep and file reads to find relevant code spans.

- Add warpGrepEnabled to codebaseIndexConfigSchema
- Add warpGrepApiKey to SECRET_STATE_KEYS
- Gate codebase_search on either WarpGrep or CodeIndexManager
- Try WarpGrep first in CodebaseSearchTool, fall back to vector search
- Add settings UI with toggle and API key field in CodeIndexPopover
- Persist settings via webviewMessageHandler

Closes: RooCodeInc#11865
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WarpGrep search subagent integration

1 participant