# FastContext — Microsoft's Explore subagent cuts coding-agent tokens by 60%

> Small 4B subagent that searches the repo for a bigger coding model, lifting SWE-bench resolution by up to 5.5% while cutting main-agent tokens by 60%.

- Org: Microsoft
- Date: 2026-06-15
- Category: paper, algorithm, model
- Source: https://arxiv.org/abs/2606.14066
- Canonical page: https://ai-tldr.dev/releases/microsoft-fastcontext/

## In short

Microsoft and SJTU release FastContext: a small repository-exploration subagent that does parallel code search and hands focused context to a larger coding model. MIT-licensed code and 4B SFT and RL checkpoints are out.

## What it is

FastContext is a research release from Microsoft Research and Shanghai Jiao Tong University. It splits coding-agent work into two roles: a cheap exploration model that finds the right files and snippets, and a stronger problem-solving model that does the actual reasoning over that focused context.

## How it works

The explorer issues many code searches in parallel and returns short file-and-line evidence instead of dumping full files. The team trained explorers from 4B to 30B parameters with supervised fine-tuning followed by reinforcement learning, optimizing them to surface the right code with the fewest tokens. The main coding model then runs over only the explorer's distilled findings.

## Why it matters

Coding agents hit a wall on long repos because context fills with irrelevant files. A specialised explorer raises SWE-bench Verified resolution by up to 5.5% while shaving 60% off the main model's token bill — useful for any agent that pays per-token. FastContext slots in as a callable tool for existing coding agents.

## Who it's for

coding-agent builders, SWE-bench researchers, anyone running multi-step LLM agents over large codebases

## Try it

https://github.com/microsoft/fastcontext

## Quick facts

- Makers: Microsoft Research and Shanghai Jiao Tong University
- What it is: A small repository-exploration subagent that finds the right files for a larger coding model
- License: MIT (code)
- Explorer model sizes: 4B to 30B parameters
- Training: Supervised fine-tuning followed by reinforcement learning
- SWE-bench Verified gain: Up to 5.5% higher resolution
- Token savings: 60% off the main model's tokens
- Availability: Code on GitHub, 4B SFT and RL checkpoints on Hugging Face

## FAQ

### What is FastContext?

FastContext is a research release from Microsoft Research and Shanghai Jiao Tong University. FastContext splits coding-agent work into two roles: a cheap exploration model that searches the repository and finds the right files and code snippets, and a stronger problem-solving model that reasons over that focused context. The smaller explorer hands distilled findings to the larger coding model.

### How much does FastContext improve coding agents?

FastContext raises SWE-bench Verified resolution by up to 5.5% while cutting the main coding model's token use by about 60%. The explorer returns short file-and-line evidence instead of full files, so the main model reads only relevant context. These gains help any agent that pays per token when working over large codebases.

### Is FastContext open source?

Yes. FastContext ships with MIT-licensed code on GitHub at github.com/microsoft/fastcontext. The team also released model checkpoints on Hugging Face, including 4B supervised fine-tuning and reinforcement-learning versions. FastContext is built to slot in as a callable tool for existing coding agents rather than as a standalone product.

### How does FastContext work?

FastContext uses an explorer model that issues many code searches in parallel and returns short file-and-line evidence instead of dumping whole files. The team trained explorers from 4B to 30B parameters with supervised fine-tuning followed by reinforcement learning, rewarding them for surfacing the right code with the fewest tokens. The main coding model then runs over only those distilled findings.

## Links

- [Paper (arXiv)](https://arxiv.org/abs/2606.14066)
- [Code](https://github.com/microsoft/fastcontext)
- [Models](https://huggingface.co/collections/microsoft/swe-fastcontext)
