As Large Language Models (LLMs) transition from writing simple, isolated functions to acting as autonomous "coding agents" within massive repositories, our evaluation benchmarks have struggled to keep pace. Existing benchmarks, such as SWE-bench, often allow for "heuristic shortcuts"—a model might successfully fix a bug by retrieving and modifying a local patch without ever truly understanding the broader execution flow or module dependencies.
To address this gap, researchers have introduced Gistify, a novel evaluation task designed to challenge LLMs to distill complex codebase functionality into a single, minimal, and self-contained executable file. The results reveal that even frontier models like Claude-4 and GPT-5 struggle with deep structural reasoning, particularly when faced with long execution traces and high repository coverage.
The Gistify Task
The authors argue that true codebase-level understanding requires the ability to follow execution paths across multiple files and identify only the essential components needed for a specific feature.
To test this, the Gistify task operates as follows: given a full codebase and a specific entry point (like a test command), the agent must generate a "gist." This gist is a single file that replicates the exact behavior of the entire repository for that specific command, without relying on any external dependencies.
The generated file must meet four strict requirements:
- Self-Contained: It must run standalone, meaning all internal dependencies from the original codebase must be inlined.
- Execution Fidelity: It must produce the exact same output and behavior as the original codebase.
- Minimalism: It should contain only the code essential for that specific execution path, eliminating any "dead" code.
- Grounded Preservation: The code must be derived directly from the original source; hallucinations or "cheating" by hard-coding outputs are strictly forbidden.
To evaluate these requirements, the authors utilize three primary metrics: Execution Fidelity (a binary success/fail of the run), Line Execution Rate (measuring minimalism), and Line Existence Rate (measuring how much of the code was faithfully preserved from the original versus hallucinated).
Experimental Setup
The researchers evaluated models across six Python repositories. Five are established, popular repositories (requests, pylint, flask, scikit-learn, and seaborn), and one is a new repository (debug-gym), a library specifically designed for interactive debugging tasks. They extracted 25 test cases per repository to serve as the entry points for the task.
Key Insights and Results
Evaluating top-tier models across different agentic frameworks (like SWE-agent and GitHub Copilot) revealed several fascinating insights into how LLMs process complex code.
- Claude-4 Leads in Robustness: Claude-4 emerged as the most robust performer, achieving a 54–61% average execution fidelity rate across different frameworks.
- Conciseness vs. Faithfulness: There is a clear trade-off between model "personalities." GPT-5 tends to produce more concise, minimal files (resulting in a high Line Execution Rate). In contrast, Claude-4 is more "faithful," preferring to preserve the original structure of the code even if it includes slightly more overhead (yielding a high Line Existence Rate).
- Scaffolding Matters: The environment provided to the model significantly impacts performance. Smaller models like GPT-5-mini saw massive performance jumps—from roughly 17% success in a bare-bones environment to 58% success—when integrated into a sophisticated agentic framework like GitHub Copilot.
- The "Reasoning Backwards" Hypothesis: Success on Gistify is highly correlated with the model's ability to faithfully copy the initial test function. If a model fails to accurately replicate the starting point of the execution, its subsequent reasoning over dependencies almost always falls apart.
- The Complexity Wall: The difficulty of the task scales sharply with the "length of trace" (number of function calls) and the number of unique files touched. Current agents hit a performance wall as execution traces grow longer and more complex.
Surprising Findings on Tooling and Failure Modes
Interestingly, giving models access to runtime execution tools (like debuggers) only yielded marginal gains. In some cases, it actually hurt performance because models got "lost" in long, multi-step trajectories and hit maximum step limits.
When analyzing failure modes, the most common reason for failure in top-tier models was Pytest Runtime Errors (syntax or logic errors in the generated file). Smaller models, however, often failed at the very first hurdle: simply failing to find or include the required test function at all.
Limitations and Future Work
The primary limitation of the current Gistify benchmark is its reliance on existing test suites as entry points. While this allows for automatic benchmark generation, it does not cover non-deterministic code or repositories lacking robust testing.
Future work will likely extend Gistify to arbitrary entry points. Furthermore, "gistified" files could eventually be used as tools themselves—helping human developers or other AI agents quickly understand a specific feature of a massive, unfamiliar codebase by providing a clean, isolated execution path.
Summary updated