Latest / Daily Paper Cast / Doc2Harness: Benchmarking LLMs on Long-Horizon Harness Engineering of Coding Agents
Transcript
- 0:03Evan: Welcome to Daily Paper Cast.
- 0:05Ashley: Today's paper is from the Hugging Face daily paper list of October 15, 2026, and it has received thirty-nine upvotes.
- 0:14Evan: The title is 'Doc2Harness: Benchmarking LLMs on Long-Horizon Harness Engineering of Coding Agents.'
- 0:22Ashley: The first two authors are Yuyao Ge and Shenghua Liu.
- 0:26Shenghua Liu is the corresponding author, and they're both from the Institute of Computing Technology at the Chinese Academy of Sciences.
- 0:33Evan: Alright, let's delve into the Introduction.
- 0:36Ashley, can you walk us through the background and objectives of this paper?
- 0:41Ashley: Certainly.
- 0:42As coding agents powered by large language models, or LLMs, become more adept, they're being deployed in more complex environments.
- 0:51Evan: And with complexity comes the need for better harnesses to manage interactions and tools, right?
- 0:57Ashley: Exactly.
- 0:58A harness essentially manages the interaction loop, tool execution, session state, permissions, failure recovery, and result verification.
- 1:07It ensures that the model's capabilities are effectively applied to the environment.
- 1:11Evan: Sounds like a crucial component.
- 1:13But human supervision for every agent step seems impractical, right?
- 1:18Ashley: Right, which is why there's a push towards recursive self-improvement.
- 1:22This means agents modify their own harnesses over time by learning from the outcomes of their actions.
- 1:28Evan: Interesting.
- 1:29So, what specifically does the paper propose to advance this area?
- 1:34Ashley: The authors introduce Doc2Harness, a two-stage benchmark focused on evaluating how well LLMs develop harnesses for long-horizon tasks.
- 1:43This is significant because most existing benchmarks don't explore the harness engineering itself.
- 1:49Evan: Two-stage benchmark?
- 1:50That sounds detailed.
- 1:52Can you break down these stages for us?
- 1:54Ashley: Sure.
- 1:55In the first stage, known as the construction stage, the build model works within a fixed builder harness.
- 2:01It’s given a development document and a contract skeleton, and then constructs a candidate harness in an isolated container.
- 2:08Evan: So the build model operates with predefined guidelines?
- 2:11Ashley: Precisely.
- 2:12The development document consolidates behavior from twelve frontier harnesses, ensuring a broad coverage.
- 2:19The contract skeleton provides the necessary interfaces without implementation details.
- 2:24Evan: But how do they ensure the harness is actually functional?
- 2:29Ashley: Good question.
- 2:30In Stage 2, the candidate harness is moved to isolated containers, one per test case, and is driven by a pre-scripted mock model.
- 2:38They observe four channels: requests sent to the model, files on disk, process exit codes, and command output.
- 2:46Evan: And these observations aggregate into a pass rate, reflecting how well the harness works?
- 2:51Ashley: Exactly.
- 2:52They use positive controls to rule out what they call 'vacuous passes,' ensuring that passes reflect genuine functionality rather than testing artifacts or loopholes.
- 3:02Evan: Got it.
- 3:03It sounds rigorous.
- 3:04What kind of results did they find?
- 3:06Ashley: The study evaluated 19 frontier models and found significant differences in performance.
- 3:12GPT-6 Astra, for instance, achieved the highest pass rate at around 53%, while the weakest model had a pass rate of approximately 27%.
- 3:22Even the best model failed nearly half of the test cases.
- 3:25Evan: That's a notable range.
- 3:27What do they conclude from these results?
- 3:29Ashley: They highlight that harness performance isn't just about adding more capability but also about how cross-cutting functionalities are divided among modules.
- 3:38This clustering of failures suggests that better modular design could improve outcomes.
- 3:43Evan: Alright, that's the end of the Introduction section.
- 3:46Let's continue to the methods next.
- 3:50Evan: Alright, Ashley, let's dive into the Methods section.
- 3:54How do the authors go about designing and implementing Doc2Harness?
- 3:58Ashley: Sure, Evan.
- 3:59The Methods section of the paper describes two main components: the construction phase and the evaluation phase.
- 4:06Let's walk through Stage 1 first, which is all about construction.
- 4:10Evan: What happens in the construction phase?
- 4:12Ashley: In Stage 1, a build model operates inside a fixed builder harness.
- 4:17It's provided with a development document and a contract skeleton, which it uses to construct a candidate harness inside an isolated container.
- 4:25Evan: And what's included in this development document?
- 4:28Ashley: The development document is pretty comprehensive.
- 4:31It's developed in three steps: first, they collect a feature inventory from twelve frontier harnesses; then, these features are turned into clauses specifying syntax, meaning, and expected behavior; finally, they disambiguate and ensure the clauses are self-consistent.
- 4:48Evan: So the document essentially tells the model what the harness should look like and how it should behave.
- 4:53What about the contract skeleton?
- 4:55Ashley: Precisely.
- 4:56The contract skeleton provides the framework the model needs to follow.
- 5:00It includes five Python source files, an install script, an entry script, and a project configuration, but it's stripped of any actual implementation beyond the necessary interfaces.
- 5:11Evan: Got it.
- 5:12And once the build model constructs the candidate harness, what's the next step?
- 5:16Ashley: Once the candidate harness is constructed, it's submitted for a contract check.
- 5:21This check makes sure the harness compiles, installs, and meets all interface requirements.
- 5:27If it passes, the harness is frozen as a candidate.
- 5:30If it fails, the model makes revisions and resubmits, up to three times or until time runs out.
- 5:37Evan: And then comes Stage 2, right?
- 5:39Ashley: Exactly.
- 5:40Stage 2 is the evaluation phase.
- 5:43Here, the frozen candidate harness is placed in isolated containers, one per test case, and driven end-to-end by a pre-scripted mock model.
- 5:51Evan: What kind of test cases do they use?
- 5:53Ashley: They created 328 test cases that span a wide range of scenarios.
- 5:59These cases are designed to evaluate different aspects of the harness, like file operations, permissions, session state, and more.
- 6:07Evan: How do they ensure that a pass in these test cases is legitimate and not just a fluke?
- 6:12Ashley: Great question.
- 6:13They use a system of positive controls to rule out vacuous passes.
- 6:17For instance, if a test case checks that a symlink pointing outside the workspace is correctly blocked, a positive control would ensure the symlink inside the workspace is actually readable.
- 6:28If the positive control fails, the test case is recorded as FAIL, regardless of its own status.
- 6:34Evan: So a lot of checks and balances are in place.
- 6:37It's like they left no stone unturned.
- 6:39Ashley: They observe four channels for each test case: requests sent to the model, files on disk, process exit code, and command output.
- 6:48These observations are aggregated into a pass rate that reflects the harness's performance.
- 6:54Evan: Sounds thorough.
- 6:55What kind of environment do they use for these tests?
- 6:58Ashley: Both stages are run on an AMD EPYC 7K83 machine with 48 logical processors and 128 GB of memory.
- 7:08For the construction phase, each build takes place in a newly created empty container with no external network access, other than the designated model gateway.
- 7:18Evan: I see.
- 7:20Does the build model have any constraints on submissions?
- 7:23Ashley: Yes, each build is subject to a two-hour wall-clock limit and can only make up to three submissions.
- 7:30So the process is quite disciplined.
- 7:32Evan: That ensures efficiency.
- 7:34How do they synthesize the test cases?
- 7:36Ashley: They use three methods to generate the test cases: public issue mining, cross-harness comparison, and single-variable expansion.
- 7:44Public issue mining looks at defect records in public repositories of mature harnesses.
- 7:49Cross-harness comparison examines differences between the candidate harness and a mature harness.
- 7:55Single-variable expansion creates new test cases by varying one aspect of an existing discriminative test case.
- 8:02Evan: That's a comprehensive approach.
- 8:04What do they do to validate these test cases?
- 8:06Ashley: They validate the test cases through a meticulous process, ensuring each test case is anchored in the development document and capable of distinguishing between different implementations.
- 8:17Evan: Very detailed.
- 8:18It seems like a rigorously designed benchmark.
- 8:21Ashley: It is.
- 8:22The positive controls help ensure the reliability of the pass rates, making Doc2Harness a robust tool for evaluating harness engineering.
- 8:30Evan: Thanks for the detailed breakdown, Ashley.
- 8:32That covers the Method section comprehensively.
- 8:35Let's move on to the next part.
- 8:38Evan: Now that we've covered the methods in detail, let's take a closer look at the Experiments and Results.
- 8:45Ashley, what setups and findings do the authors present?
- 8:49Ashley: Sure, Evan.
- 8:50The authors evaluated nineteen frontier models from eleven different vendors.
- 8:54Some of these models include GPT-6 Astra, various versions of Opus, models from Qwen, and others like GLM, DeepSeek, and MiMo.
- 9:04They used an AMD EPYC 7K83 server with 128 GB of memory for running both stages of the benchmark.
- 9:13Evan: That’s quite a diverse set of models.
- 9:16How did each perform?
- 9:17Ashley: Performance varied significantly.
- 9:19GPT-6 Astra achieved the highest pass rate of 53.05%, while the weakest model, Hy3, had a pass rate of 27.44%.
- 9:32The average pass rate across all models was approximately 38.30%.
- 9:37Evan: That’s a pretty big range.
- 9:40What do they attribute these differences to?
- 9:42Ashley: The authors noted that the largest performance gaps appeared in how well the models handled boundary scenarios.
- 9:49For example, GPT-6 Astra excelled in these cases compared to Opus 5, which performed better in ordinary scenarios but lagged in boundary ones.
- 10:00Evan: What exactly do they mean by 'boundary scenarios'?
- 10:04Ashley: Boundary scenarios are those that test the limits of functionality and module interaction.
- 10:09These are cases where the harness must correctly manage permissions, file operations, session states, and other intricate behaviors that don't often occur in normal usage but are crucial for robust performance.
- 10:21Evan: So even the strongest model, GPT-6 Astra, failed nearly half of the test cases.
- 10:28What kind of insights do they derive from that?
- 10:30Ashley: One key insight is that harness performance requires more than just adding capabilities; it also involves effective partitioning of cross-cutting functionalities across modules.
- 10:40The clustering of failures around poor modular design suggests that a more integrated approach could yield better results.
- 10:47Evan: Interesting.
- 10:48Did the authors go into how the different models structured their candidate harnesses?
- 10:53Ashley: Yes, they did.
- 10:54They analyzed the source code of fifty-seven scored candidate harnesses across various metrics like code lines, number of modules, lines per module, and the size of the largest module.
- 11:06The number of code lines per harness ranged from around 1,271 to over 16,681, and they observed that models which split functionality across fewer, larger modules generally performed better.
- 11:20Evan: It sounds like a classic case of quality over quantity.
- 11:25Splitting functionality into fewer modules seems to be a key factor.
- 11:30Ashley: Exactly.
- 11:31They found a negative partial correlation between the number of modules and pass rates.
- 11:36In simpler terms, fragmentation of code didn't pay off; more consolidated modules had a positive impact on performance.
- 11:44Evan: Makes sense.
- 11:45It's like when too many cooks spoil the broth.
- 11:47Did they find any other significant patterns?
- 11:49Ashley: Yes, they also looked at the categories where models performed the best and worst.
- 11:54For instance, the 'Permissions' category had the greatest average pass rate variance, indicating it was a strong discriminator among models.
- 12:03On the other hand, the 'Interactive Terminal' category performed uniformly well across most models.
- 12:09Evan: What are these categories exactly?
- 12:12Ashley: The nine categories include file operations, session states, permissions, headless operation, direct drive, interactive terminal, artifact checks, startup, and extension discovery.
- 12:25These categories aim to cover the wide range of functions a harness needs to manage.
- 12:30Evan: So they took a very detailed approach, analyzing each aspect separately.
- 12:34Ashley: And this detailed evaluation shows that the harness’s structural design is as important as its functional capabilities.
- 12:41Their analysis indicates that better design principles could significantly enhance performance.
- 12:47Evan: That's insightful.
- 12:48It really highlights how comprehensive this benchmark is.
- 12:52That covers the Experiment section.
- 12:55Evan: Alright, Ashley, now let's move on to the Related Work section.
- 13:00How does Doc2Harness fit into the broader landscape of benchmarks and evaluations in the AI field?
- 13:07Ashley: This section draws comparisons with existing work to highlight the unique aspects of Doc2Harness.
- 13:14The authors categorize previous benchmarks into two main classes: code completion and repository-level generation.
- 13:22Evan: Can you give us examples of these benchmarks?
- 13:26Ashley: Sure.
- 13:27In the code completion category, we have benchmarks like HumanEval, which evaluate single functions using unit tests, and SWE-bench, which scales this up to a full repository level by asking models to resolve real issues.
- 13:42On the repository-level generation side, there are benchmarks like Commit0 and NL2Repo-Bench, which focus on reconstructing entire libraries from scratch.
- 13:52Evan: So, these benchmarks either evaluate small-scale code completions or the ability to generate whole repositories.
- 14:02How does Doc2Harness differ?
- 14:04Ashley: Doc2Harness differs in its focus on harness engineering.
- 14:08It evaluates how well models can build and manage the complex software environments that coding agents work within.
- 14:14The authors argue that existing benchmarks do not adequately capture this aspect, which is critical as harnesses become more integrated into AI workflows.
- 14:23Evan: And there are other harness-focused benchmarks as well?
- 14:28Ashley: Yes, there are a few.
- 14:29For instance, Claw-SWE-Bench evaluates existing harnesses but fixes the prompt, budget, workspace, and evaluator, finding significant performance impacts from the choice of harness.
- 14:42Another example is Harness-Bench, which isolates configuration-level effects to demonstrate the harness's impact on model performance.
- 14:50Evan: That makes sense.
- 14:51So where does Doc2Harness stand in relation to these other harness benchmarks?
- 14:56Ashley: Doc2Harness introduces a novel evaluation paradigm by assessing the harness development process itself, rather than the performance of a harnessed model on downstream tasks.
- 15:06This addresses limitations in earlier studies where the harness's quality could confound the results.
- 15:12Doc2Harness isolates the harness-building part, enabling a more deterministic evaluation.
- 15:18Evan: Right.
- 15:20Comparing the building of a harness directly rather than evaluating the model's performance with a harness in place seems to eliminate a lot of noise.
- 15:30Quite an innovative approach.
- 15:32Ashley: Indeed.
- 15:33Another key distinction is that Doc2Harness employs a mock model with a preset script for evaluation.
- 15:39This ensures consistency and fairness in testing the harness across different scenarios, something that is harder to achieve with real-time model-driven evaluations.
- 15:49Evan: Consistency in evaluation is definitely important.
- 15:54Do the authors discuss any specific advantages of this approach?
- 15:58Ashley: Yes, they point out that using a mock model allows for an end-to-end, black-box evaluation where each test case is driven to completion in a controlled environment.
- 16:08This method not only checks whether the harness can handle specific tasks but also verifies that it adheres to the specified protocols and constraints.
- 16:17Evan: So it's a thorough check on both functionality and adherence to protocol.
- 16:22But how do they address potential issues like 'vacuous passes' where the harness might pass a test by default rather than through correct functionality?
- 16:31Ashley: Great question.
- 16:32They incorporate positive controls to rule out such false positives.
- 16:36For example, if a test case checks whether the harness correctly blocks access to forbidden files, a positive control would check that the harness can still read permissible files.
- 16:46This way, any failure in observation is caught and addressed.
- 16:49Evan: That's quite comprehensive.
- 16:51Any other unique angles that Doc2Harness brings to the table?
- 16:55Ashley: One final point the authors raise is the detailed analysis of harness modularity.
- 17:00They found that fewer, larger modules tend to perform better, which is an insight that goes beyond individual test performance to inform better harness design practices overall.
- 17:11Evan: That's fascinating.
- 17:13It really shows the depth and breadth of considerations that Doc2Harness brings to the evaluation of harness engineering.
- 17:21And that's the end of the Related Work section.
- 17:25Evan: Now that we've explored the details of the methods, experiments, and related work, let's take a moment to summarize the key contributions and takeaways of the Doc2Harness paper.
- 17:37Ashley: Sure, Evan.
- 17:38The main contribution of Doc2Harness is its novel two-stage benchmark designed to evaluate how well large language models can develop harnesses for long-horizon tasks.
- 17:49Evan: Right.
- 17:49And this involves a comprehensive approach, starting with the construction of a candidate harness using a fixed builder harness, development document, and contract skeleton.
- 17:59Ashley: Exactly.
- 18:00The second stage involves evaluating the constructed harnesses in isolated containers, driven end-to-end by a mock model.
- 18:08This allows for a deterministic evaluation of the harness's performance.
- 18:12Evan: And what insights did their results reveal?
- 18:16Ashley: Their results revealed significant variations in performance among the nineteen evaluated models.
- 18:22The strongest model, GPT-6 Astra, had a pass rate of 53.05%, while the weakest, Hy3, had 27.44%.
- 18:34They found that performance was largely influenced by how well cross-cutting functionalities were managed across modules.
- 18:41Evan: Interesting.
- 18:42So better modular design is key to improving harness performance.
- 18:46Ashley: Precisely.
- 18:47And they also introduced the concept of positive controls to ensure that passes reflect genuine functionality and not just testing artifacts, which adds robustness to the evaluation process.
- 18:58Evan: That's a pretty comprehensive benchmark.
- 19:01Well, folks, that's a wrap for today.
- 19:03We've covered the groundbreaking contributions of Doc2Harness and how it sets a new standard in evaluating harness engineering for coding agents.
- 19:13Ashley: Thanks for tuning in to Daily Paper Cast.
- 19:15We hope you found today's episode both insightful and engaging.
- 19:19Evan: Be sure to join us next time as we delve into another intriguing paper from the world of AI and machine learning.
- 19:27Ashley: Until then, keep exploring, stay curious, and we'll catch you in the next episode.
- 19:32Evan: Goodbye for now!