import { morph } from 'morph'Morph WarpGrep
Better, faster, cheaper search via subagents
A code search subagent that runs in a separate context window. Up to 36 tool calls across 3 turns—no embeddings required.
Use cases
Code Search · Log Search · Package Search. Read the docs →
01
02
03
const result = await morph.warpGrep.execute({04
query: 'Find where billing invoices are emailed',05
repoRoot: './my-project',06
})07
08
// Clean results, no context pollution09
console.log(result.contexts) // Relevant code only10
console.log(result.summary) // Search findingsWarpGrep
Search codebases without
blowing context
Isolated context window
Searches your codebase in a separate context window. Your main agent only sees clean results—never raw grep output or dead-end searches.
01
import { morph } from 'morph'02
03
// WarpGrep searches in isolation04
const result = await morph.warpGrep.execute({05
query: 'Find where billing invoices are generated',06
repoRoot: '.',07
excludes: ['node_modules', '.git'],08
includes: ['src/**/*.ts']09
})10
11
// Returns only relevant code sections12
for (const ctx of result.contexts) {13
console.log(ctx.file, ctx.content)14
}Multi-turn reasoning
Up to 36 parallel tool calls across 3 turns. Reasons about what to search, runs grep/read/list_dir in parallel, returns relevant code in seconds.
WarpGrep
Turn 1 · 8 parallel calls
├─grep -r "webhook.*handler"2.1k
│ ⎿
├─grep -E "async.*subscribe"1.8k
│ ⎿
├─read src/api/billing.ts:1423.2k
│ ⎿
├─grep "customer\.create"1.4k
│ ⎿
├─list_dir src/services/0.8k
│ ⎿
├─read src/lib/stripe.ts:1-802.6k
│ ⎿
├─grep -r "invoiceId"1.9k
│ ⎿
└─read src/api/checkout.ts:552.3k
⎿
14 tool calls · 3 turns~3.4s
Best-in-class F1 score
WarpGrep achieves 0.73 F1 in just 3.8 steps—3x fewer than comparable agentic approaches. Deep logic queries show 2x-6x better performance.
#ModelF1 ScoreScoreSteps
1Warp Grep
0.733.8 steps
2SWE Grep
0.723.7 steps
3Claude Haiku
0.7212.4 steps
4Gemini Flash
0.6610.8 steps
5GLM 4.5
0.3414.5 steps
6mgrep
0.181 steps
WarpGrep achieves 0.73 F1 in 3.8 steps — 3x fewer than comparable agentic approaches
How WarpGrep works
Parallel breadth-first search
