AI coding agents
CodeGrep Spins Repository Search Out Into a Dedicated 14B Agent, Using 19% Fewer Tokens on Successful Fixes
CodeGrep first narrows the scope of changes through parallel grep, glob, and file-reading operations, then passes candidate files to a frozen OpenHands coding agent. It maintains a roughly 27% repair rate on SWE-bench Verified while reducing inference costs, but the model and training pipeline have not yet been released.

The cost of coding agents comes not only from generating patches, but also from identifying which files need to be changed. A new study analyzed OpenHands 30B trajectories on SWE-bench Verified: each successful case averaged 23 turns and consumed 631,000 tokens, with many tool calls devoted to grep, glob, and file reading. The researchers therefore extracted the exploration stage into CodeGrep—a 14B retrieval agent trained end to end with GRPO. It can operate search tools in parallel across multiple turns, ultimately passing only the candidate files to a fixed downstream coding agent.
The team mined supervision signals from 67,000 open-source agent trajectories and built a reinforcement learning environment that isolates tasks using Git worktrees. Across all 500 SWE-bench Verified tasks, CodeGrep achieved a 27.0% repair rate, compared with 25.8% for the baseline without a separate retriever. Among successfully repaired cases, it reduced interaction turns by 15% and token usage by 19%. The more important finding is not the 1.2-percentage-point difference, but that retrieval precision may have a utility threshold: BM25, with file precision of 0.375, actually degraded downstream agent performance; Jina, at 0.445, was roughly neutral; only after CodeGrep reached 0.677 did it consistently reduce rollout costs.
This provides a concrete decomposition point for coding-agent architectures: general-purpose models need not relearn repository navigation for every repair, and search strategies can become independent, trainable, and replaceable components. However, the results currently come from only one author-configured 30B OpenHands downstream agent, and the cost statistics focus on successful cases. The paper promises to release the model, training pipeline, and evaluation tools, but no downloads were available at publication time. The next step is to determine whether this precision threshold can be reproduced across models, programming languages, and large monorepos—and whether the retriever’s own inference cost offsets the tokens it saves.