AI
LLM-Based Framework Disentangles Messy Code Commits with Collaborative Reasoning
Researchers propose ColaUntangle, a multi-agent system that separates tangled commits by reasoning about both explicit and implicit code dependencies, improving untangling accuracy by 44–82%.
Software developers are expected to keep commits atomic—each addressing a single, focused concern. In reality, many pull requests bundle unrelated changes together, creating tangled commits that slow code review and make maintenance harder. A new research framework aims to solve this problem using collaborative language model agents.
The Challenge of Tangled Commits#
Messy commits combine multiple distinct modifications into one changeset, obscuring the intent of individual changes. Previous techniques for automatically separating them—whether rule-based, feature-based, or graph-based—tend to miss the forest for the trees: they rely on surface-level signals and struggle to capture both the mechanical relationships (like control and data flows) and the deeper conceptual ties (semantic or domain reasoning) between pieces of code.
ColaUntangle: A Multi-Agent Approach#
Researchers introduced ColaUntangle, a framework that pairs multiple LLM-driven agents to reason about code changes holistically. The system operates as follows:
- One agent focuses on explicit dependencies—control flow, data dependencies, and other structural links between code elements
- A second agent specializes in implicit dependencies—semantic meanings, conceptual ties, and higher-level domain relationships
- A reviewer agent iteratively consults both specialists and synthesizes their insights into a final untangling decision
To ground this reasoning, the framework constructs both Explicit and Implicit Contexts—structured representations that let agents reason over code relationships with symbolic precision and semantic depth.
Results Across Two Languages#
Testing on standard datasets revealed significant gains:
- C# dataset (1,612 tangled commits): 44% improvement over the best existing baseline
- Java dataset (14k tangled commits): 82% improvement over prior approaches
These improvements suggest that collaborative multi-agent reasoning, combined with LLM understanding of both structural and conceptual code properties, can meaningfully advance the state of automated commit untangling.

