Microsoft
June 15, 2026
FastContext: Training Efficient Repository Explorer for Coding Agents
arXiv:2606.14066v1 [cs.SE] 12 Jun 2026
Shaoqiu Zhang1,2,*,† Maoquan Wang1,* Yuling Shi2,* Yuhang Wang2 Xiaodong Gu2 Yongqiang Yao1 Rao Fu1 Shengyu Fu1,‡ 1 Microsoft 2 Shanghai Jiao Tong University {maoquanwang, yongqiangyao, raofu, shengyufu}@microsoft.com {Qiushao418, yuling.shi, lingbo_2022, xiaodong.gu}@sjtu.com
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
1
Introduction
Coding agents have become a prominent approach for automated software engineering, capable of handling everything from localized code refactoring to repository-level question answering (Yang et al., 2024; Zhang et al., 2024; Xia et al., 2024; Wang et al., 2026a). Industry-leading assistants such as Claude Code, Codex, GitHub Copilot CLI, and Cursor (Anthropic, 2026; OpenAI, 2026; GitHub, 2026; Cursor, 2026) continuously push these boundaries through increasingly sophisticated mechanisms, with the recent rise of specialized subagents marking a vital frontier in the field. However, the repository exploration mechanisms powering these advanced systems are typically proprietary, leaving the research community without open training and evaluation recipes to build upon. Benchmarks such as SWE-bench and SWE-QA exemplify the community’s shift from isolated coding problems toward realistic tasks that require navigating large, multi-file codebases (Jimenez et al., 2024; Peng et al., 2026); newer suites further broaden this setting across harder, multilingual, and decontaminated evaluations (Deng et al., 2025; Badertdinov et al., 2025). Across these tasks, an agent must explore the repository to identify relevant files and code regions before it can reason about a fix or answer. As such, this exploration stage plays a critical role in both task success and inference efficiency. We use main agent to refer to the coding agent responsible for solving the task, and subagent to refer to a specialized helper that the main agent can invoke for a narrower repository-exploration job. However, repository exploration remains a costly part of current agent trajectories, as also observed by SWE-Pruner for coding-agent context consumption (Wang et al., 2026b). Our preliminary analysis shows * Equal contribution. † Work done during a project at Microsoft CoreAI. ‡ Corresponding author.
2
FastContext : Training Efficient Repository Explorer for Coding Agents