LongCapHarness: Capability-Guided Auto-Harnessing for Long-Context Reasoning

Tao Zhang, Yuhang HearXiv 2026

TL;DR

LongCapHarness is a new framework that boosts LLM long-context reasoning by "harnessing" a model's latent capabilities rather than relying on expensive post-training. By automatically decomposing complex tasks into smaller "capability primitives" and refining them through recursive self-improvement, it outperforms state-of-the-art data-synthesis methods on major benchmarks like HELMET and RULER at less than half the development cost.

What Problem Does This Paper Address?

As context windows for Large Language Models (LLMs) expand, the standard recipe for improving long-context reasoning has been "more data, more training." Researchers typically synthesize massive long-context corpora and perform computationally intensive post-training.

However, this approach has several drawbacks: it is empirically driven (often a "black box"), extremely expensive, and difficult to scale. The authors of LongCapHarness argue that the central challenge isn't just fitting more tokens into a window; it’s the model's inability to coordinate complex operations—like localizing evidence and integrating intermediate results—within a single, monolithic end-to-end call. They hypothesize that models already possess the latent skills needed for these tasks; they just need a better "harness" to organize their execution.

Methods

LongCapHarness moves away from model training and toward harness engineering. The framework consists of three main phases:

  1. Capability Decomposition: A powerful "harnessing agent" (in this study, GPT-5.6-Sol) analyzes a task and breaks it down into capability primitives. For example, a "Reranking" task is decomposed into "Relevance Judgment" and "Ordering" primitives.
  2. Recursive Self-Improvement (RSI): The agent iteratively builds and refines these primitives on a development set. It writes the control logic (how primitives interact), implements the primitives (using either Python code for logic or LLM calls for semantics), and manages the "capability state." It compares the output against reference answers and revises the harness until performance stabilizes.
  3. Test-Time Execution: The final, optimized harnesses are stored in a library. At test time, an execution model (like Llama-3-8B) selects the appropriate harness from the library and runs it as a structured program.
The LongCapHarness pipeline uses RSI to build a library of reusable workflows.

This approach effectively decouples the total input length from the context budget of any single model call, as the harness can supply each call with only the specific context it needs.

Datasets

The authors evaluated LongCapHarness across three major long-context benchmarks:

  • HELMET: A comprehensive suite covering RAG, long-context QA, and reranking.
  • RULER: A benchmark designed to test the "effective" context size of models.
  • LongBench-v2: A dataset featuring realistic, long-context multi-tasks.

The development set used for RSI included 2,242 examples, while the evaluation was conducted on a massive held-out test set of 59,826 examples.

Key Insights and Ideas

  • Latent vs. Explicit Capability: The most striking insight is that LLMs without explicit long-context pre-training can show elite performance if equipped with the right capability-guided harness.
  • Logical vs. Physical Organization: Previous "agentic" approaches often focused on physical organization (like chunking text to avoid token limits). LongCapHarness focuses on logical organization—structuring the task-solving operations themselves.
  • Code-LLM Hybridization: The framework excels by knowing when to use code. Primitives like "counting" or "sorting" are implemented as deterministic code, while "semantic judgment" is left to the LLM. This hybrid approach significantly reduces errors in tasks that are traditionally "brittle" for LLMs.
  • Cross-Model Transferability: Harnesses developed using one model (Llama-3-8B) can be successfully transferred to another (Qwen2.5-3B) with minimal performance loss, suggesting that the "logic" of a task is model-agnostic.

Key Results

LongCapHarness achieved the highest aggregate scores among all evaluated methods, including those that used expensive post-training.

Figure 1: Performance superiority and cost effectiveness of LongCapHarness compared with the three recent data-synthesis-based baselines and the RSI baseline.
  • Superior Accuracy: On HELMET and RULER, LongCapHarness (using Llama-3-8B) scored 79.32, significantly beating the post-trained NExtLong baseline (70.15).
  • Perfect Recall: It achieved a perfect 100.00 score on Recall tasks across all context lengths (8K to 128K), whereas standard models and post-trained variants saw sharp declines as context grew.
  • Cost Efficiency: The estimated development cost was approximately **$541**, which is less than 15% of the estimated training cost for NExtLong ($3,696) and less than 30% for PolicyLong ($1,858).
  • Inference Savings: While it uses more input tokens due to multiple calls, it generates substantially fewer output tokens, making the total inference cost comparable to or better than standard RAG-based agents.

Limitations and Future Work

The primary limitation is the "Strong Agent" dependency. The framework currently requires a very high-tier model (GPT-5.6-Sol) to act as the harnessing agent. When the authors tried using weaker models like Llama-3-8B to build their own harnesses, performance dropped sharply.

Future work will likely focus on "bootstrapping"—enabling smaller, open-source models to autonomously develop and refine their own capability harnesses. Additionally, while the framework handles logical tasks perfectly, it still relies on the base model's semantic judgment for tasks like summarization, which remains a performance ceiling.

Summary updated

Abstract

Existing methods enhancing an LLM's long-context reasoning capability often rely on data synthesis and follow-up LLM post-training. However, the data synthesis strategy and the post-training recipes are empirically driven and computationally intensive. In this work, we propose a new framework, dubbed LongCapHarness, to instead harness the underlying capabilities for long-context reasoning. The harnessing process recursively revises and updates capability primitive implementation, capability state and control logic through recursive self-improvement on the development set. With neither data synthesis nor LLM post-training, LongCapHarness is applied to Llama3-8B and transferred to Qwen2.5-3B. LongCapHarness substantially outperforms recent data-synthesis-based baselines on HELMET and RULER benchmarks; its estimated development cost is less than 50% of the estimated training costs of NExtLong and PolicyLong. We hope these results motivate further research into harnessing the latent capabilities of LLMs to solve tasks beyond their explicit training.
BibTeX
@misc{zhang2026longcapharness,
  author = {Tao Zhang and Yuhang He},
  title = {{LongCapHarness: Capability-Guided Auto-Harnessing for Long-Context Reasoning}},
  year = {2026},
  eprint = {2611.10463},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10463},
}
Figure