Apply to my task
arXiv:2610.13075 ★ 94 Oct 9, 2026

LongHarness: the agent keeps two lists — "facts with sources" and "current conclusions with gaps" — and searches only for what closes the gaps

Key result

From 15.8% to 60.2% exact answers on the same model: instead of one long conversation, the agent keeps two lists. The LongHarness method lets you get an answer from a huge folder of documents and see which sources it rests on. The first list is the evidence bank: short facts with a link to a file the agent read and a status of active / superseded / retracted. The second is the conclusion state: what the agent believes is true and which gaps are still missing. The trick: the agent doesn't search for "anything useful," only for what closes a recorded gap. The Claude Code and Codex harnesses on the same model scored 48.1% and 46.6%.

01

TL;DR

LongHarness is a harness for an agent that answers questions over a huge folder of documents (tens of millions of tokens). Instead of one long conversation history, the agent keeps two separate lists. The first is an "evidence bank": short claims, each with a link to a source it actually read and a status (active / superseded / retracted). The second is the "conclusion state": what the agent currently believes is true and which gaps still stand in the way of an answer. The next search targets the gaps strictly, and every new fact immediately triggers a review of the conclusion.

A regular agent loses the thread. It finds "supplier A will deliver on Monday," goes off searching further, and that condition evaporates from its head. Or it searches forever until the budget runs out and ends up guessing. The reason is simple: conclusions live "somewhere in the chat history" or in free-form notes, and the model can't see what's settled and what isn't. The result: direct reading gets 15.8% exact answers, while the same agent with explicit lists gets 60.2%. The Claude Code and Codex harnesses on the same model scored 48.1% and 46.6%.

The method runs as a loop of three actions. The agent searches and reads for the current gap. Then it records what it found in the evidence bank with a source, marking stale entries "superseded" or "retracted." After that it revisits the conclusions and gaps. Before the final answer, it checks whether the remaining gaps could change the decision.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STATE 1: Evidence bank   → [id | claim | source | status: active/superseded/retracted]
STATE 2: Conclusion state → [conclusion | which ids it rests on | open gaps]

LOOP (many turns, states persist between turns):
  STEP 1: Pick a gap → search/read only what closes it
  STEP 2: Record the fact in the bank (always with a link to the source you read)
          Correction = new entry, old one → "superseded"; error → "retracted"
  STEP 3: Revisit conclusions against active evidence → update the gaps
  STEP 4: Before answering: add anything missed, check whether gaps could change the decision
  STOP: budget exhausted → answer with no guarantees

This is a harness with a controller program: it checks format, links, and budget. You can reproduce the idea in an agent with instruction files (see the template), but then you'll have to check links and budget yourself.

03

Example

Task: You're launching a line of thermoses on Amazon. The shipment has to be at the warehouse by Friday. The folder holds 300 emails, packing slips, and invoices from two factories. First impression: factory A is faster and cheaper. The agent has to pick a supplier and show what the choice rests on.

Prompt: (for an agent in Claude Code or Cursor with access to the /supply folder)

Question: which supplier (A or B) can get the shipment to the Amazon fulfillment center in Joliet by Friday 6:00 PM?

Follow the rules in CLAUDE.md: maintain the files EVIDENCE.md and CONCLUSIONS.md.
Initial conclusion: "A is faster and cheaper." This is a hypothesis, not a fact.
For every conclusion, immediately list the gaps: what you need to find to confirm or refute it.
Search only for what closes the gaps. Limit: 40 searches.

Result: The agent creates two files and updates them at every step. EVIDENCE.md gets entries like "A: ships Monday" with a link to the email. CONCLUSIONS.md holds the starting hypothesis and the gap "when does B arrive?". Once it finds B's shipping notice, the agent adds an entry, revisits the conclusion, and closes the gap. The old entry gets the status "superseded." At the end you get an answer with links to active evidence. If the search limit runs out first, the answer comes with a list of unclosed gaps instead of a silent fallback to the first hypothesis.

04

Why It Works

The weakness. The model is bad at holding on to "what's been established and what hasn't" as the history grows. Early findings drown in later ones, corrections never reach the final conclusion, and search turns into wandering. Free-form notes barely help: conclusions, facts, and questions are all jumbled together.

The strength. The model is good at local operations: read a chunk, write down a claim with a link, compare it to a conclusion, spell out what's missing. These are all short, well-defined tasks.

How the method uses this. Facts and conclusions are split into two lists, and a gap becomes a "search assignment." That gives search a goal, and it stops when there are no gaps left. The "superseded" and "retracted" statuses keep stale facts out of the reasoning. Ablations confirm it: structured conclusions beat free-form notes by 6.8 and 7.8 points. An "append-only" list with no replacement lost 3.8 and 10 points.

Control levers: - Search and read limits → lower them for simple questions, raise them for complex compound ones. - The "gaps" field → without it the agent goes back to wandering. The explicit instruction "search by gaps" also added a gain in the ablation. - Mandatory source link → remove it and entries turn into "retelling from memory." - Pre-answer check ("could the gaps change the decision?") → swap in your own stopping criterion, e.g. "all gaps closed or marked unavailable."

05

Prompt Template

For an agent instructions file (CLAUDE.md / AGENTS.md) or a system prompt. The structure keeps the method's logic: two states, statuses, a loop over gaps.

<Role>
You are a research agent. You answer a question over a large folder of documents {folder}.
You can't read everything, so you work through two working files.
</Role>

<State>
EVIDENCE.md — the evidence bank. Only facts from sources you've read.
Entry format: [e{number}] | {claim} | {file / page / paragraph} | status: active | superseded by e{N} | retracted
Rules:
- An entry without an exact link to a source you actually read is forbidden.
- Correcting a fact = a new entry; the old one gets the status "superseded by e{N}".
- If a fact turns out to be wrong and there's no replacement — status "retracted".
- Delete nothing. Change only statuses.

CONCLUSIONS.md — the conclusion state. Only your interpretations.
Format:
  Conclusion c{number}: {current judgment} | rests on: e{..}, e{..} | confidence: confirmed / hypothesis
  Gap g{number}: {what needs to be found to confirm, refine, or refute conclusion c{..}}
Don't mix facts and conclusions: facts go only in EVIDENCE, judgments only in CONCLUSIONS.
</State>

<ReasoningLogic>
Before you start: state a first hypothesis for the answer and list the gaps.
While there are open gaps and the limit isn't exhausted ({search_limit} searches, {read_limit} reads):
  1. Pick the gap that matters most for the decision.
  2. Find and read what could close it. Don't search "just in case."
     If there are several hypotheses, look for what tells them apart.
  3. Record what you found in EVIDENCE.md per the rules above.
  4. Show the updated entries, then revisit CONCLUSIONS.md:
     is the conclusion still confirmed, does it need refining, or has it changed?
     Update the evidence links and the list of gaps.
  5. If the gap didn't close, rephrase the query or widen the reading scope.
If a piece of evidence is superseded or retracted, conclusions don't change on their own: revisit them manually.
</ReasoningLogic>

<FinalCheck>
Before answering:
- Account for every relevant active entry not yet reflected in the conclusions.
- Check: could the remaining gaps change the answer to the question?
- In the answer, cite the active entries e{..} and their sources.
- If the limit is exhausted and gaps remain, say plainly what data was missing. Don't silently fall back to the first hypothesis.
</FinalCheck>

Fill in: {folder} — where the documents live, {search_limit} and {read_limit} — the budget for the task.

🚀 Quick start — paste into a chat:

Here's a template for an agent that tracks evidence and conclusions. Adapt it to my task: [your task].
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask where the documents live, what the question is, and what deadlines and deal-breakers apply. It will also check the search budget and whether strict source links are required. That's how the template gets statuses, a gap format, and a stopping point tailored to your task.

06

Limitations

⚠️ You need a harness, not just a prompt: In the paper, a controller program checks links, budget, and format. A regular agent working with files has none of that. The agent alone is responsible for each entry faithfully reflecting its source, and there's no controller.

⚠️ No evidence for simple tasks: The method was tested on hard questions over huge corpora, where values have to be gathered from many documents. For "find one number in one file," two state files are just extra overhead.

⚠️ The gain depends on the model: With one model the edge over the best competing harness is 12–19 points; with another, on the hard set, about one point. Don't expect the same lift everywhere.

⚠️ Single runs: The main comparisons use one run per configuration. Triple runs are in the appendix, but only for one model.

⚠️ No automatic recompute: When evidence is superseded or retracted, conclusions don't update automatically. The agent has to revisit them itself, and the instructions must say so explicitly.

07

How They Studied It

The researchers used four question sets. The main one is OfficeQA Pro: questions over hundreds of U.S. Treasury documents. For the first version that's about 100 million tokens; in the second the corpus is twice as large and the questions are compound: you have to gather and reconcile values from different sources. Agents aren't handed the "right" documents; search is part of the task. To test on a given context they added two more sets: AA-LCR and the long portion of LongBench v2.

They compared three things. First, "bare" models fed search-retrieved fragments in a 256K-token window. That worked poorly: at most 23.2% on the first version and 5.6% on the second. Second, off-the-shelf harnesses (Codex, Claude Code, RLM) on the same model. Third, LongHarness. The models were identical across all comparisons, so the difference came only from the harness.

The result on GLM-5.3-Flash: 60.2% vs. 48.1% for Claude Code on the first version, and 61.1% vs. 42.2% for Codex on the second. Then they broke down where agents lose: finding the evidence, holding on to it until the answer, or turning it into a correct answer. LongHarness won at all three stages, especially at search and at final answer assembly. Ablations switched off one component at a time. The biggest drop came from removing structured conclusions, and "append-only" accumulation turned out almost as bad. Interestingly, on the harder second version every ablation hurt more. The more values you have to reconcile, the more it matters to keep your evidence in order.

08

Adaptations and Extrapolations

🔧 Technique: add a "what would change the answer" field to each gap → search gets even more targeted

Gap g3: when does B arrive? | if the date is after Friday → choose A; if before → choose B

This way the agent knows up front why it needs a fact and doesn't collect extras.

🔧 Technique: remove the opacity → see the drift

Add to the rule: "after each step, show the changes to EVIDENCE and CONCLUSIONS as a list of 'added / superseded / retracted'." You'll immediately spot where the agent dropped a condition.

Extrapolation: the same principle in a regular chat without documents. For a long decision analysis ("which job offer to take," "where to invest $50,000"), you can ask the model to end every reply with two blocks: "Facts (what you've told me, with dates)" and "Current conclusion + what's missing." When you correct a fact, it marks the old one as superseded and revisits the conclusion. This is a transfer of the idea; the paper didn't test this scenario.

09

Resources

  • LongHarness: Advancing Agentic Reasoning over 100M-Token Corpora via Stateful Evidence Management — the main paper.
  • Benchmarks: OfficeQA Pro V1/V2 (Opsahl-Ong et al., 2026), AA-LCR (Artificial Analysis), LongBench v2 (Bai et al., 2024).
  • Compared against Codex (OpenAI), Claude Code (Anthropic), RLM (Zhang et al., 2025).
  • Author names and universities aren't listed in the input data.

Research digest

Key result

From 15.8% to 60.2% exact answers on the same model: instead of one long conversation, the agent keeps two lists. The LongHarness method lets you get an answer from a huge folder of documents and see which sources it rests on. The first list is the evidence bank: short facts with a link to a file the agent read and a status of active / superseded / retracted. The second is the conclusion state: what the agent believes is true and which gaps are still missing. The trick: the agent doesn't search for "anything useful," only for what closes a recorded gap. The Claude Code and Codex harnesses on the same model scored 48.1% and 46.6%.

Principle

The agent works in a loop. It takes one gap and searches only for what will close it. It records the fact in the bank with a link to the source. If the fact corrects an old one, the old entry becomes "superseded." If the fact turns out to be wrong, it becomes "retracted." Then the agent revisits the conclusions and updates the gaps. Before answering, it checks whether the remaining gaps could change the decision. Think of a ledger, not a draft on a napkin. Entries don't get erased; they get a new status. Conclusions live separately from facts, and every gap turns into a search assignment. The search limit keeps it from wandering forever. If the budget runs out, the agent names the unclosed gaps outright instead of silently falling back to the first hypothesis.

Why it works

The model is bad at remembering what's already been established once the history balloons. Early findings drown in later ones. Corrections never reach the bottom line. "Supplier A will deliver on Monday" simply evaporates. Free-form notes barely help: fact, conclusion, and question sit in one heap. But the model is good at small tasks. Read a chunk, write down a claim with a link, compare it to a conclusion, name what's missing. The method slices the work into exactly those steps. Search gets a goal, and with it a stopping point: no gaps left, time to answer. Switching off parts of the method confirmed this. Structured conclusions beat free-form notes by 6.8 and 7.8 points. An "append-only" list without the "superseded" and "retracted" statuses lost 3.8 and 10 points.

When to apply

Questions over huge archives → especially compound ones, where the answer is assembled from values in dozens of documents (emails, packing slips, invoices, contracts, reports). Works well when facts contradict each other or change over time, like delivery dates. Not a fit for "find one number in one file": two state files will only add overhead. In the paper, a controller program checked links, budget, and format. A regular agent with files doesn't have one, so check the links yourself. The gain depends on the model: on one it was +12–19 points over the best harness, on another about +1.

Mini recipe

1. Create two files: EVIDENCE.md for facts and CONCLUSIONS.md for conclusions. Put the rules in CLAUDE.md or AGENTS.md. 2. Set the fact format: `[e1] | claim | file / page | status: active`. An entry without a link to a source actually read is forbidden. 3. Give a starting hypothesis: call it a hypothesis, not a fact. Right away, list the gaps: what to find to confirm or refute it. 4. Forbid deletion: a correction is written as a new line, the old one becomes "superseded by e{N}". An error with no replacement becomes "retracted". 5. Set a limit: for example, 40 searches. Fewer for simple questions, more for compound ones. 6. Spell out manual review: a superseded or retracted fact won't update conclusions by itself. Write in the instructions: "after a status change, revisit every conclusion that relied on it." 7. Add a pre-answer check: "could the remaining gaps change the decision?" If the limit ran out, have it name what data was missing. 8. Don't want to write the template yourself: paste it into a chat and write: `Adapt this to my task: [task]. Ask me questions to fill in the fields.`

Examples

[BAD]: `Go through the /supply folder and tell me which supplier can ship by Friday` [GOOD]: `Question: which supplier (A or B) can get to the Amazon fulfillment center in Joliet by Friday 6:00 PM? Maintain EVIDENCE.md: facts in the format [e1] | claim | file | status active/superseded/retracted. Maintain CONCLUSIONS.md: conclusions and gaps. Starting hypothesis: "A is faster and cheaper." This is not a fact. List what you need to find to test it. Search only for what closes the gaps. Limit: 40 searches. If you find new data, mark the old entry "superseded" and revisit the conclusion. If the limit runs out, name the unclosed gaps.` What happens: EVIDENCE.md gets the entry "A: ships Monday" with a link to the email. CONCLUSIONS.md gets the gap "when does B arrive?". Once it finds B's shipping notice, the agent adds a new entry and revisits the conclusion. The old entry becomes "superseded." The answer links only to active evidence.

In plain words

Ordinary AI agents go dumb instantly when you feed them corporate archives of hundreds of millions of tokens: the working context turns into a junk drawer where early findings drown in fresh guesses. The LongHarness architecture fixes this failure at the root by throwing out the endless conversation log entirely. Instead of a wall of text, the model keeps a structured evidence state: it strictly separates confirmed facts from speculation and sees the blind spots that actually stand in the way of an answer.

It's the difference between a panicky sleuth and a meticulous detective. The panicker scribbles everything into one notebook where suspicions are mixed with rumors and old alibis just get forgotten — a total mess in the head. LongHarness works like a detective's evidence board: every card hangs on its own, pinned firmly to a document, and debunked theories immediately get the status "into the trash".

The method rests on two gears. The first is the evidence bank: facts are broken into claims with hard labels "active", "superseded", or "retracted". The second is the conclusion state: the agent keeps the current picture and a list of gaps in focus. The next search across a giant 100M-token pile targets exactly those blind spots, so the model doesn't run in circles or make things up.

In the test, the agent dug through a mountain of hundreds of invoices and emails to pick a supplier against a deadline, but the principle is completely universal. It's a ready-made template for complex audits, reviewing legal contracts, or mergers and acquisitions. Anywhere a single buried line about a discount or a penalty can wipe out a multimillion-dollar deal, dumb keyword search will fall flat, while tracking statuses will pull out what matters.

Bottom line: stop hoping a model with a huge context window will "figure it all out on its own." State control beats long context. If the agent can't cross out what's stale and close gaps one by one, what you get out is an expensive, self-confident hallucination.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on LongHarness: the agent keeps two lists — "facts with sources" and "current conclusions with gaps" — and searches only for what closes the gaps arXiv:2610.13075

Sign in to apply this study New accounts get 50 free credits.