{"slug": "frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded", "title": "Frontier labs sell tokens, and their coding agents are trained to grep. We graded 251 greps: 36% missed", "summary": "Papr hand-graded 251 greps run by its coding agent on its own repository and found the right code was missing from the results in 91 of them (36%), with 85 of 90 misses proceeding to write code that was reworked within a week more often than code from successful searches (65% vs 48%, small sample). Across 5,268 tool-using turns from August to November 2026, turns with 5 or more searches accounted for 29% of turns and 63% of spend, and in 49 Cursor transcripts the team counted 3,294 greps against 2 semantic searches. Papr addressed the misses by leaving grep's output untouched and adding up to three likely-missed files from a 0.6B code embedding model (Apache-2.0, fine-tuned from Qwen3-Embedding-0.6B, CoreML + ONNX) with a code graph and reranker; on 50 replayed misses the needed file appeared 46 times and the 25 controls did not worsen.", "body_md": "Frontier labs sell tokens. Their coding agents find code with grep: in 49 Cursor transcripts we counted 3,294 greps and 2 semantic searches. So we checked how well grep actually works.\n\nDisclosure: I work on Papr, and the embedding models below are ours. We hand-graded 251 real greps our coding agent ran on our own repo. In 91 (36%) the right code wasn’t in the results. The agent almost never stopped: 85 of 90 misses went on to write code, and that code was reworked within a week more often (65% vs 48%, small sample).\n\nCost: across 5,268 tool-using turns (Aug–Nov 2026), turns with 5+ searches were 29% of turns and 63% of spend. Those are also the bigger tasks, so this shows where spend sits, not a controlled saving.\n\nTwo questions I’d like opinions on:\n\n1. **Why is grep the default search action in agent training?** It’s easy to train on: every repo has it, the output is plain text, and a non-empty result looks like progress. But it requires guessing the identifier first. Our example: searching “copy app files” returns nothing, because the function is`installBundle()` calling`fs.cp` .\n2. **Is there an incentive problem?** Labs bill by the token. A nine-call search bills nine calls, and a miss bills the rewrite. I don’t think anyone designed it that way, but nothing obviously pushes the other way. Are there agent RL setups that reward finding the right file in fewer calls?\n\nWhat we tried: keep grep’s output untouched and add up to three files it likely missed, found by a 0.6B code embedding model running on-device, with a code graph and a reranker on top. On 50 replayed misses the needed file showed up 46 times, and the 25 controls didn’t get worse.\n\nFull method, grading rubric and benchmarks: [Coding agent grep cost: 63% of spend, 1 in 3 misses | Papr](https://www.papr.ai/blog/coding-agent-grep-cost) The 0.6B model (Apache-2.0, fine-tuned from Qwen3-Embedding-0.6B, CoreML + ONNX): [papr-ai/papr-embed-code-1-0.6b · Hugging Face](https://huggingface.co/papr-ai/papr-embed-code-1-0.6b)\n\nHas anyone measured the miss rate of their own agent’s greps? And if you think the token incentive is the wrong explanation, what explains 3,294 greps to 2 semantic searches?", "url": "https://wpnews.pro/news/frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded", "canonical_source": "https://discuss.huggingface.co/t/frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded-251-greps-36-missed/192958#post_2", "published_at": "2026-12-02 03:01:11+00:00", "updated_at": "2026-12-02 03:15:51.016525+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-research", "large-language-models", "developer-tools"], "entities": ["Papr", "Cursor", "Qwen3-Embedding-0.6B", "papr-ai/papr-embed-code-1-0.6b", "Hugging Face"], "also_reported_by": [], "takeaway": "Hand-grading 251 agent greps found 36% missed the right code, and turns with 5+ searches were 29% of turns but 63% of spend; adding up to three embedding-model-suggested files recovered the needed file in 46 of 50 replayed misses without regressing 25 controls.", "recommendation": {"advice": "Keep grep's output unchanged but append up to three files suggested by a code embedding model plus a code graph and reranker; the source recovered the needed file in 46 of 50 replayed misses with no regression on 25 controls.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded", "markdown": "https://wpnews.pro/news/frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded.md", "text": "https://wpnews.pro/news/frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded.txt", "jsonld": "https://wpnews.pro/news/frontier-labs-sell-tokens-and-their-coding-agents-are-trained-to-grep-we-graded.jsonld"}}