NetEase's CodeGrep: An RL Agent Cutting Coding Agent Token Cost by 19%

_reachsumit · x · 2026-08-07

Modern LLM coding agents like Claude Code and OpenHands waste much of their token budget finding files to patch. On SWE-Bench Verified, a 30B OpenHands agent averages 23 rounds and 631K tokens per resolved issue.

To solve this inefficiency, researchers introduced CodeGrep, a 14B retrieval agent. Trained end-to-end with GRPO, it issues multi-turn parallel grep, glob, and read tool calls to return candidate files to a frozen downstream coding agent.

Across all 500 SWE-Bench Verified instances, CodeGrep preserves the resolve rate (27.0%) while substantially improving efficiency: it reduces rounds by 15% and tokens by 19% on resolved instances. The study also identifies a precision threshold for retrievers, showing that retrieval only reduces rollout cost when precision is sufficiently high.

Original post →

More from coding & agent

coding & agent channel →