A code search subagent that finds relevant code in a separate context window. No embeddings, no indexing.
Prompt for your coding agent
Read https://docs.morphllm.com/sdk/components/warp-grep and integrate WarpGrep into our agent. Search for where our agent's tools or subagents are defined and register WarpGrep there as a code-search subagent, keeping raw grep for exact-string lookups. Before designing anything, deep-dive how WarpGrep's multi-turn tool-calling loop works at https://docs.morphllm.com/sdk/components/warp-grep/direct: it runs grep and read operations in its own context window and returns only the relevant spans. Write out an integration plan first, then implement and verify with a real natural-language search.
Coding agents spend 60% of their turns searching for code. Each search dumps file contents into the main context window, crowding out the reasoning the agent actually needs.WarpGrep fixes this by searching in a separate context window. It’s a code search subagent: a dedicated LLM call that takes a natural language query, runs multiple grep and file-read operations, reasons about what’s relevant, and returns matching code. Typical searches complete in under 6 seconds.
For Codebase Search, you also need ripgrep. Install via your package manager (brew install ripgrep, apt-get install ripgrep, or choco install ripgrep). GitHub Search runs fully on the cloud, no local dependencies needed.Get your API key from the Morph Dashboard.