FastContext: Training Efficient Repository Explorer for Coding Agents

📅 2026-06-11
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Large language models often suffer from high computational overhead and context contamination during codebase exploration, which degrades task-solving efficiency. This work proposes FastContext—a specialized exploration agent that introduces a decoupled architecture separating exploration from problem solving for the first time. FastContext employs parallelized, on-demand tool retrieval to return only concise file paths and line ranges as focused context. The approach incorporates task-driven multi-round evidence collection and precise citation generation, further enhanced by strong reference-model trajectory guidance and reinforcement learning to enable multi-objective optimization of exploration models ranging from 4B to 30B parameters. When integrated with Mini-SWE-Agent, FastContext improves end-to-end solve rates by up to 5.5% across multiple benchmarks while reducing token consumption of the coding agent by as much as 60%.
📝 Abstract
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
Problem

Research questions and friction points this paper is trying to address.

repository exploration
coding agents
token budget
context pollution
code retrieval
Innovation

Methods, ideas, or system contributions that make the work stand out.

repository exploration
coding agents
context compression
specialized subagent
token efficiency
🔎 Similar Papers
No similar papers found.