Git Context Controller: Manage the Context of LLM-based Agents like Git

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wu, Junde, Hu, Minhao, Zhu, Jiayuan, Pan, Jiazhen, Liu, Yuyuan, Xu, Min, Jin, Yueming
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915825061986304
author Wu, Junde
Hu, Minhao
Zhu, Jiayuan
Pan, Jiazhen
Liu, Yuyuan
Xu, Min
Jin, Yueming
author_facet Wu, Junde
Hu, Minhao
Zhu, Jiayuan
Pan, Jiazhen
Liu, Yuyuan
Xu, Min
Jin, Yueming
contents Large language model (LLM) agents have demonstrated strong capabilities in long-horizon tasks by interleaving reasoning with tool use. However, as these agents scale to complex workflows such as software engineering and open-ended research, context management becomes a fundamental bottleneck: interaction histories grow unbounded, become costly to maintain, and are difficult to reuse across sessions and agents. We introduce \textbf{Git-Context-Controller (GCC)}, a structured context management framework inspired by software version control systems. GCC elevates agent context from a transient token stream to a persistent, navigable memory workspace with explicit operations -- \texttt{COMMIT}, \texttt{BRANCH}, \texttt{MERGE}, and \texttt{CONTEXT}, that enable milestone-based checkpointing, isolated exploration of alternative reasoning paths, and hierarchical retrieval of historical context. By organizing agent memory as a versioned file system, GCC allows agents to manage long-term goals, recover and transfer reasoning across sessions, and coordinate multi-trajectory problem solving in a principled manner. Empirically, agents equipped with GCC achieve state-of-the-art performance on both SWE-Bench and BrowseComp benchmarks. On SWE-Bench Verified, GCC improves task resolution by over 13\% relative to strong long-context baselines and outperforms 26 existing open and commercial systems, reaching over 80\% success rate. The project will be open-sourced for the research community. The algorithm has been incorporated to the project: https://one-context.com
format Preprint
id arxiv_https___arxiv_org_abs_2508_00031
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Git Context Controller: Manage the Context of LLM-based Agents like Git
Wu, Junde
Hu, Minhao
Zhu, Jiayuan
Pan, Jiazhen
Liu, Yuyuan
Xu, Min
Jin, Yueming
Software Engineering
Large language model (LLM) agents have demonstrated strong capabilities in long-horizon tasks by interleaving reasoning with tool use. However, as these agents scale to complex workflows such as software engineering and open-ended research, context management becomes a fundamental bottleneck: interaction histories grow unbounded, become costly to maintain, and are difficult to reuse across sessions and agents. We introduce \textbf{Git-Context-Controller (GCC)}, a structured context management framework inspired by software version control systems. GCC elevates agent context from a transient token stream to a persistent, navigable memory workspace with explicit operations -- \texttt{COMMIT}, \texttt{BRANCH}, \texttt{MERGE}, and \texttt{CONTEXT}, that enable milestone-based checkpointing, isolated exploration of alternative reasoning paths, and hierarchical retrieval of historical context. By organizing agent memory as a versioned file system, GCC allows agents to manage long-term goals, recover and transfer reasoning across sessions, and coordinate multi-trajectory problem solving in a principled manner. Empirically, agents equipped with GCC achieve state-of-the-art performance on both SWE-Bench and BrowseComp benchmarks. On SWE-Bench Verified, GCC improves task resolution by over 13\% relative to strong long-context baselines and outperforms 26 existing open and commercial systems, reaching over 80\% success rate. The project will be open-sourced for the research community. The algorithm has been incorporated to the project: https://one-context.com
title Git Context Controller: Manage the Context of LLM-based Agents like Git
topic Software Engineering
url https://arxiv.org/abs/2508.00031