𝗙𝗮𝘀𝘁𝗖𝗼𝗻𝘁𝗲𝘅: 𝗦𝗲𝗽𝗮𝗿𝗮𝘁𝗲 𝗦𝗲𝗮𝗿𝗰𝗵 𝗳𝗿𝗼𝗺 𝗦𝗼𝗹𝘃𝗶𝗻𝗴
Coding agents waste too much time looking for code.
Microsoft and Shanghai Jiao Tong University studied this problem. They found that searching for code uses 56.2% of tool use turns. It also uses 46.5% of total tokens.
When one model searches and fixes code, its memory gets messy. It fills up with useless file snippets and failed guesses. This makes reasoning harder.
FastContext solves this. It uses a separate subagent for repository exploration.
How it works: • The explorer agent finds the right files and line numbers. • It does not send long summaries to the main agent. • It only sends a small bundle of exact evidence. • The main agent stays focused on fixing the bug.
This design offers two big wins:
- Less noise. The main agent does not see every dead end.
- Better efficiency. Smaller models (4B to 30B parameters) can handle the search task effectively.
The results are clear. Using FastContext with Mini-SWE-Agent improved task success by 5.5%. It also cut token use by 60%.
Lessons for building agents:
- Treat search as a core task, not a side step.
- Send file paths and line numbers, not full chat histories.
- Train models to provide structured data for the next model.
- Watch your token usage as closely as your success rate.
Do not force one model to do everything. A specialist for searching makes the solver faster and more reliable.
Optional learning community: https://t.me/GyaanSetuAi