OpenHands/CodeScout-1.7B

Model

CodeScout-1.7B

1

9 commits

1 linked in READMEs

updated Mar 19, 2026

See the code

README

CodeScout-1.7B

πŸ“„ Paper β€’ πŸ’» Code β€’ πŸ€— Collection

Compact yet powerful β€” outperforms 8Γ— larger Qwen3-14B using only a Unix terminal.

CodeScout Overview

CodeScout-1.7B is part of the CodeScout family of open-source RL-trained code search agents. CodeScout models achieve state-of-the-art repository-level code localization using nothing more than a standard Unix terminal β€” no static analysis, no repository graphs, no language-specific tooling.

Key Highlights

  • Outperforms 8Γ— larger Qwen3-14B with absolute F1 gains of 11–18% for files and 10–15% for functions
  • Competitive with 18Γ— larger Qwen3-32B (Thinking), surpassing it by 3–6% in function F1
  • Matches RepoNavigator-7B performance while being 4Γ— smaller
  • Demonstrates that RL + distillation can compress strong code search into a 1.7B model

Results

Performance on SWE-Bench code localization (instance-averaged F1 scores):

BenchmarkCodeScout-1.7BCodeScout-4BCodeScout-14B
SWE-Bench Verified β€” File F155.4668.5268.57
SWE-Bench Verified β€” Func F128.2236.7840.32
SWE-Bench Pro β€” File F140.9651.7753.63
SWE-Bench Pro β€” Func F118.2429.0328.74
SWE-Bench Lite β€” File F156.5767.0371.84
SWE-Bench Lite β€” Func F127.0739.8744.43

File-level F1 vs Model Size Function-level F1 vs Model Size

Code localization performance on SWE-Bench Verified. CodeScout (⭐) achieves superior or competitive results over larger open-source LLMs and narrows the gap with closed-source frontier models.

Training

CodeScout-1.7B is trained in two stages:

Stage 1 β€” Rejection Fine-Tuning (RFT): Qwen3-1.7B is warm-started via supervised fine-tuning on 4K perfect-score trajectories (F1 = 1.0 at all granularities) sampled from CodeScout-14B, yielding the CodeScout-1.7B-RFT checkpoint.

Stage 2 β€” RL Training: CodeScout-1.7B-RFT is further trained with GSPO reinforcement learning.

  • Training data (RL): 800 instances (disjoint from RFT data)
  • RL steps: 100
  • Batch size: 8, with 8 rollouts per instance
  • Max context length: 32K tokens
  • Max turns per episode: 4
  • Reward: Multi-level F1 (file + module + function)
  • Hardware: 8Γ—H100 GPUs
  • Learning rate: 1e-6 (constant)

How It Works

CodeScout uses the OpenHands-Bash scaffold β€” an agent equipped with only a Terminal tool (supporting standard Unix commands like rg, find, grep, ls) and a LocalizationFinish tool for structured output submission. The agent iteratively navigates the repository to identify relevant files, classes, and functions related to a given issue.

The model is trained with GSPO (Group Sequence Policy Optimization) using multi-level F1 rewards at the file, module, and function level.

Intended Use

CodeScout-1.7B is designed for repository-level code localization: given a GitHub issue description and a code repository, it identifies the relevant files, classes, and functions that need to be modified. It is intended to be used as a localization subagent within larger coding agent pipelines.

Limitations

  • Trained and evaluated exclusively on Python repositories
  • Designed for code localization, not code editing or issue resolution
  • Performance may vary on repositories significantly different from the training distribution
  • Requires the OpenHands-Bash scaffold for optimal performance

Citation

@misc{sutawika2026codescouteffectiverecipereinforcement,
      title={CodeScout: An Effective Recipe for Reinforcement Learning of Code Search Agents}, 
      author={Lintang Sutawika and Aditya Bharat Soni and Bharath Sriraam R R and Apurva Gandhi and Taha Yassine and Sanidhya Vijayvargiya and Yuchen Li and Xuhui Zhou and Yilin Zhang and Leander Melroy Maben and Graham Neubig},
      year={2026},
      eprint={2603.17829},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2603.17829}, 
}
agent
code-localization
code-search
conversational
endpoints_compatible
GSPO
OpenHands
qwen3
reinforcement-learning
safetensors
software-engineering
SWE-Bench
text-generation
text-generation-inference
transformers

OpenHands/CodeScout-1.7B

Model

CodeScout-1.7B

1

9 commits

1 linked in READMEs

updated Mar 19, 2026

See the code

README

CodeScout-1.7B

πŸ“„ Paper β€’ πŸ’» Code β€’ πŸ€— Collection

Compact yet powerful β€” outperforms 8Γ— larger Qwen3-14B using only a Unix terminal.

CodeScout Overview

CodeScout-1.7B is part of the CodeScout family of open-source RL-trained code search agents. CodeScout models achieve state-of-the-art repository-level code localization using nothing more than a standard Unix terminal β€” no static analysis, no repository graphs, no language-specific tooling.

Key Highlights

  • Outperforms 8Γ— larger Qwen3-14B with absolute F1 gains of 11–18% for files and 10–15% for functions
  • Competitive with 18Γ— larger Qwen3-32B (Thinking), surpassing it by 3–6% in function F1
  • Matches RepoNavigator-7B performance while being 4Γ— smaller
  • Demonstrates that RL + distillation can compress strong code search into a 1.7B model

Results

Performance on SWE-Bench code localization (instance-averaged F1 scores):

BenchmarkCodeScout-1.7BCodeScout-4BCodeScout-14B
SWE-Bench Verified β€” File F155.4668.5268.57
SWE-Bench Verified β€” Func F128.2236.7840.32
SWE-Bench Pro β€” File F140.9651.7753.63
SWE-Bench Pro β€” Func F118.2429.0328.74
SWE-Bench Lite β€” File F156.5767.0371.84
SWE-Bench Lite β€” Func F127.0739.8744.43

File-level F1 vs Model Size Function-level F1 vs Model Size

Code localization performance on SWE-Bench Verified. CodeScout (⭐) achieves superior or competitive results over larger open-source LLMs and narrows the gap with closed-source frontier models.

Training

CodeScout-1.7B is trained in two stages:

Stage 1 β€” Rejection Fine-Tuning (RFT): Qwen3-1.7B is warm-started via supervised fine-tuning on 4K perfect-score trajectories (F1 = 1.0 at all granularities) sampled from CodeScout-14B, yielding the CodeScout-1.7B-RFT checkpoint.

Stage 2 β€” RL Training: CodeScout-1.7B-RFT is further trained with GSPO reinforcement learning.

  • Training data (RL): 800 instances (disjoint from RFT data)
  • RL steps: 100
  • Batch size: 8, with 8 rollouts per instance
  • Max context length: 32K tokens
  • Max turns per episode: 4
  • Reward: Multi-level F1 (file + module + function)
  • Hardware: 8Γ—H100 GPUs
  • Learning rate: 1e-6 (constant)

How It Works

CodeScout uses the OpenHands-Bash scaffold β€” an agent equipped with only a Terminal tool (supporting standard Unix commands like rg, find, grep, ls) and a LocalizationFinish tool for structured output submission. The agent iteratively navigates the repository to identify relevant files, classes, and functions related to a given issue.

The model is trained with GSPO (Group Sequence Policy Optimization) using multi-level F1 rewards at the file, module, and function level.

Intended Use

CodeScout-1.7B is designed for repository-level code localization: given a GitHub issue description and a code repository, it identifies the relevant files, classes, and functions that need to be modified. It is intended to be used as a localization subagent within larger coding agent pipelines.

Limitations

  • Trained and evaluated exclusively on Python repositories
  • Designed for code localization, not code editing or issue resolution
  • Performance may vary on repositories significantly different from the training distribution
  • Requires the OpenHands-Bash scaffold for optimal performance

Citation

@misc{sutawika2026codescouteffectiverecipereinforcement,
      title={CodeScout: An Effective Recipe for Reinforcement Learning of Code Search Agents}, 
      author={Lintang Sutawika and Aditya Bharat Soni and Bharath Sriraam R R and Apurva Gandhi and Taha Yassine and Sanidhya Vijayvargiya and Yuchen Li and Xuhui Zhou and Yilin Zhang and Leander Melroy Maben and Graham Neubig},
      year={2026},
      eprint={2603.17829},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2603.17829}, 
}
agent
code-localization
code-search
conversational
endpoints_compatible
GSPO
OpenHands
qwen3
reinforcement-learning
safetensors
software-engineering
SWE-Bench
text-generation
text-generation-inference
transformers