Number Only Every Tenth Line When an Agent Reads a File

~1.6% of cache-read tokens per file read; a small compounding lever inside a larger token-cost cut Advanced 2 min read

Coding agents prefix every line of a read file with its line number so the model can cite and edit by line. Those numbers sit in the cached prefix and get re-read every turn. Numbering only every 10th line keeps edits accurate while trimming the scaffolding you pay to re-read.

๐Ÿ”’ Pro tip ยท Advanced

Unlock this tip โ€” and 129 more

This is one of 130 advanced, fact-checked tactics reserved for Pro. Get the full 152-tip library, a searchable archive, and a new tip every morning. Free for 7 days, then $9/mo.

Prefer to browse? The 22 Beginner tips are free forever.