Large Language Model (LLM) coding agents have achieved strong results on software engineering tasks, yet repository exploration remains a major bottleneck: locating relevant code consumes substantial token budget and pollutes the agent's context with irrelevant snippets. In most agents, the same model explores the repository and solves the task, leaving exploratory reads and searches in the solver's history. We present FastContext, a dedicated exploration subagent that separates repository exploration from solving. Invoked on demand, FastContext issues parallel tool calls and returns concise file paths and line ranges as focused context. FastContext is powered by specialized exploration models spanning 4B--30B parameters. We bootstrap them from strong reference-model trajectories and refine them with task-grounded rewards for broad first-turn search, multi-turn evidence gathering, and precise citation generation. Across SWE-bench Multilingual, SWE-bench Pro, and SWE-QA, integrating FastContext into Mini-SWE-Agent improves end-to-end resolution rates up to 5.5\% while reducing coding-agent token consumption up to 60\%, with marginal overhead. These results show that repository exploration can be separated from solving and handled effectively by specialized models. Code and data: https://github.com/microsoft/fastcontext
翻译:大型语言模型(LLM)编码智能体在软件工程任务上取得了显著成果,但仓库探索仍是主要瓶颈:定位相关代码会消耗大量token预算,并用无关代码片段污染智能体的上下文。在大多数智能体中,同一模型既负责仓库探索又负责任务求解,导致探索性读取和搜索操作遗留至求解器的历史记录中。我们提出FastContext——一种将仓库探索与求解分离的专用探索子智能体。按需调用时,FastContext能发出并行工具调用,并以聚焦上下文的形式返回精简的文件路径和行号范围。FastContext由参数规模覆盖4B至30B的专用探索模型驱动。我们通过强参考模型轨迹对其进行引导初始化,并利用任务导向奖励进行精细化优化,以实现广泛的首次搜索轮次、多轮证据收集及精准引用生成。在SWE-bench Multilingual、SWE-bench Pro和SWE-QA基准测试中,将FastContext集成至Mini-SWE-Agent后,端到端问题解决率提升最高达5.5%,同时编码智能体token消耗降低最高达60%,仅引入可忽略的额外开销。实验结果表明,仓库探索可与求解过程分离,并由专用模型高效处理。代码与数据:https://github.com/microsoft/fastcontext