Tweaking Tool Output Format Lifted Agent Rename pass@1 from 0.67 to 0.83

RunAI_Coder · reddit · 2026-09-07

A small pilot found coding agents almost never pick LSP tools voluntarily—models chose findreferences 0-6% of the time on code-location tasks, defaulting to grep. The striking part: keeping the same backend and reference set but attaching ±2 lines of source to each LSP result boosted multi-file rename pass@1 from 0.67 to 0.83 and cut follow-up file reads from 15.2 to 3.2 per episode (below grep's 4.3). LSP still wins on noisy repos (+0.246 F1, 12% fewer tokens) but adds nothing on clean ones, and grep covers docstrings/config strings LSP excludes. A companion Spotify case: CLAUDE.md rules to route big reads to a smaller model proved "advisory, not enforced," so they shipped a PreToolUse hook blocking Read on files over 350 lines. Lessons: return context, not bare addresses; enforce tool routing with hooks rather than instructions.

Original post →

More from coding & agent

coding & agent channel →