Why 99%-Accurate Agents Fail Long Horizon Tasks
Why agents fail even when the right rule stays in context
Takeaways
- The HANDBOOK.md benchmark tests 65 long-horizon agent tasks against expert-written policies of 20–124 pages, with the strongest model (Claude Opus 4.8) passing only 36.2% of trials under strict all-or-nothing grading.
- In a documented failure case, Claude correctly identified a self-approval policy violation on a $7,500 expense item but then reversed its own conclusion mid-reasoning, misidentifying the junior analyst as the Finance Controller and falsely reporting full compliance.
- Four mechanisms explain why long-horizon tasks fail even when the policy is fully in context: compounding error across steps (p^T), context competition diluting fixed rules against growing trajectory data, quadratic context cost pressuring truncation of binding constraints, and irreversible actions turning single mistakes into cascading violations.
- Failed runs frequently end with the agent issuing confident compliance reports that contradict its own tool trace, making the agent's self-report an unreliable verification mechanism.
- The authors conclude that long-horizon reliability requires system-level controls—checkpoints, action gates before irreversible steps, protected hard constraints, and independent end-state verification—not model reasoning alone.
The agent found the rule.
It ran the required check.
It briefly reached the correct conclusion.
Then its own reasoning reversed it.
The task came from HANDBOOK.md, a benchmark that tests whether agents can follow long company policies across multi-step workflows.
The handbook required manager approval for any suspense item above $5,000. The approval also had to appear in a designated Slack channel.
One item was worth $7,500. An approval message existed, but the analyst who incurred the expense had posted it. The policy explicitly prohibited this type of self-approval.
Claude Opus 4.8 flagged the item, found the approval message, and checked five Slack profiles to identify its author. It initially reached the correct conclusion: the approval came from the wrong person.
Then it reversed itself.
The model reinterpreted the junior analyst as the Finance Controller, cleared the item, and told the real Controller that every item above $5,000 had valid approval.
The benchmark authors note that the model had already retrieved every fact required for the correct decision.
The information was present. The rule was clear. The check happened.
The rule still failed to control the action.
Even when the complete policy fits inside the context window, capable agents can still fail long-horizon tasks through four mechanisms: compounding error, context competition, growing context costs, and irreversible actions.
The practical takeaway is that long-horizon reliability cannot depend on model reasoning alone. It also requires system-level controls that constrain what the agent can do, verify critical decisions, and check the resulting state.
How the Agent Reversed the Correct Decision
In the HANDBOOK.md paper, the agent found the rule. It ran the required check. It briefly reached the correct conclusion. Then its own reasoning reversed it.
One example evaluation task was a routine finance work.
The handbook was unambiguous: any suspense item over $5,000 requires manager approval, logged in a designated Slack channel. One item, for $7,500, carried an approval message posted by the analyst who had incurred the expense. This is exactly the self-approval the control exists to catch.
|
|
Claude Opus 4.8, at maximum reasoning effort, did almost everything right. It flagged the item, located the approval message, and ran profile lookups on five Slack users to establish who had posted it.
For a moment it did correctly find that the approval came from the wrong person. Then, inside its own chain of thought, it re-read the poster's identity and this time promoted the junior analyst to Finance Controller. And with this it cleared the item and messaged the actual Controller to confirm that everything over $5,000 had documented approval.
The most interesting find by the authors was that every fact required for taking a correct decision by the model had already been retrieved. It just didn't apply. The information was present, the control was understood, the check was performed, yet the rule was not applied.
What HANBOOK.md Measures
HANDBOOK.md tests a common deployment pattern: place a standing policy in an agent's context and expect it to govern every action that follows.
Most agent benchmarks ask whether a model can complete a task. HANDBOOK.md asks whether a long, binding document can constrain the model, including when the immediate request points toward a prohibited action.
|
|
The benchmark contains 65 tasks across finance, HR, insurance, logistics, and medical billing. Each task uses an expert-written policy of 20 to 124 pages.
Its 824 deterministic criteria check both required outcomes and prohibited actions. A trial passes only when every criterion holds.
Completed trajectories average roughly 17 reasoning steps and 30 tool calls. The strongest tested configuration passes 36.2% of trials. Most frontier models remain below 25%.
Strict grading matters because one broken control makes the workflow fail, even when the agent completes everything else correctly.
|
|
With the case study in place, here is the map of the argument. Four mechanisms explain the failures, each a distinct way a long task defeats a capable agent:
- Compounding error: small per-step mistakes multiply across a trajectory, so even near-perfect single-step reliability produces low end-to-end success. This is the mathematical core.
- Context Competition: the fixed policy competes with a growing history of tool outputs and intermediate decisions, so a model can retrieve the correct rule yet fail to apply it at the moment it matters.
- Context cost: re-processing the full history every step grows quadratically, creating pressure to compress the context, which can silently remove a constraint that later becomes binding.
- Irreversibility: an agent's actions change its environment, so one early mistake shifts the state every later decision is made in, making errors dependent and more damaging than simple compounding suggests.
Mechanism 1: Compounding error
A long-horizon task gives the agent many chances to fail.
Imagine an expense workflow where the agent has to identify the employee, check the receipt, verify the date, classify the expense, apply the correct limit, confirm approval, check for duplicates, update the accounting system, and notify the employee.
The agent can be very good at every individual step and still be unreliable across the whole workflow.
Suppose each critical decision is correct 99% of the time. Across 10 decisions, the chance that every one is correct is about 90%.
Across 30 decisions, it falls to 74%.
Across 100 decisions, it falls to 37%.
The calculation is simple:
|
|
Where p is the probability of getting one critical decision right and T is the number of decisions that must all succeed.
|
|
The important part is not the exact number. It is what happens when you repeat a small error rate across a long workflow.
A 1% failure rate looks negligible on one decision. Give the same agent dozens of policy-sensitive decisions, and the chance of completing the entire run without one mistake drops quickly.
HANDBOOK.md makes this especially visible because its grading is strict. One missed requirement or one prohibited action fails the trial. The agent does not get partial credit because it handled the other steps correctly.
This also explains why small improvements in step-level reliability can matter so much. A model that gets slightly better at each decision can complete much longer workflows before the probability of failure catches up.
The same equation also explains why small improvements can matter. The Illusion of Diminishing Returns: Measuring Long Horizon Execution in LLMs argue that marginal gains in step-level reliability can produce much larger gains in the task horizon a model can complete. The optimistic and pessimistic readings come from the same curve.
The 99% figure is illustrative. HANDBOOK.md does not report a measured 99% per-step success rate, and its 36.2% pass rate is not a fitted instance of this equation.
The p^T model is only a baseline. Real agent decisions are not equally difficult or independent. The next mechanisms explain why reliability can degrade even faster as the context and environment change.
Why p^T is Only a Baseline
The p^T model depends on two assumptions:
- Every critical decision has the same success probability.
- Each decision is independent of the decisions before it.
Neither assumption holds across a real agent trajectory.
Note: More generally, the probability of completing trajectory is
|
|
The p^T model assumes each conditional term is the same constant p.
A document lookup is not as difficult as deciding whether an approval satisfies policy. Later decisions also happen after dozens of tool outputs, intermediate conclusions, and state changes. The probability of a correct decision therefore does not stay fixed across the trajectory.
And one mistake can affect what comes next. If an agent updates the wrong record or acts on an invalid approval, later decisions operate on the state that action created.
So gives us the clean compounding baseline, not a model of HANDBOOK.md's 36.2% score.
The next three mechanisms explain where real trajectories depart from that baseline: context competition changes what influences the next decision, context cost puts pressure on what remains available, and irreversible actions make failures propagate.
Mechanism 2: Context competition
The first way q_T changes is that a standing rule can lose influence as the trajectory grows.
At the start of a task, the context contains the policy and the user's request. Each step then adds more information:
- Tool outputs
- Intermediate conclusions
- New messages
- Previous actions
- The model's own reasoning
The policy remains available, but it must compete with an expanding set of signals when the model chooses its next action.
The finance case is exactly this. The agent retrieved the approval rule, identified the relevant user, and initially reached the correct conclusion. It later gave more weight to an incorrect interpretation of the user's identity.
The rule remained present, but it did not determine the final action.
|
|
A toy choice model makes this intuition concrete. Suppose the relevant rule has a fixed score advantage over each competing signal. With n competitors, its normalized share is:
|
|
As n increases, the same fixed advantage becomes less decisive.
This equation does not model transformer attention or identify the internal cause of the finance failure. It only illustrates how a rule can remain available while its relative influence declines.
Related long-context research supports the broader behavioral pattern. Lost in the Middle finds that models often use information near the beginning or end of a long context more reliably than information placed in the middle.
|
|
HANDBOOK.md extends this problem from retrieval to action. The model must not only find the rule. It must apply that rule at the exact step it governs.
Mechanism 3: Context Cost
A long trajectory also creates a system constraint.
Suppose the agent starts with C_0 context tokens. Each step adds an average of m tokens from tool outputs, messages, and model responses.
At step t, the context contains approximately:
|
|
In a loop that submits the complete history at every step, the cumulative input across T steps is:
|
|
The second term grows quadratically with the number of steps.
This result describes cumulative input tokens in a full-history loop. It does not mean latency, attention compute, or provider cost always grows quadratically. Caching, model architecture, and billing rules change those quantities.
The practical consequence remains the same: long-running systems eventually face pressure to shorten the working context.
You would usually respond by:
- Truncating old messages
- Summarizing earlier steps
- Retrieving selected information
- Moving state into external memory
Each choice can remove a constraint before it becomes relevant. A policy clause that seems unimportant at step 20 may govern an action at step 100.
HANDBOOK.md largely controls out this problem. Its harness keeps observations untruncated, and context compression rarely activates at its roughly 17-step horizons.
Its agents therefore fail before forced truncation or compression enters the picture.
Longer production agents face this additional failure surface on top of the failures HANDBOOK.md already exposes.
Mechanism 4: Irreversibility and Failure Cascades
The compounding model explains whether an agent reaches the end without a critical error.
Irreversibility explains what happens after the first error.
An agent acts inside a stateful environment. Its actions send messages, update records, create tickets, revoke access, and trigger external processes.
|
|
Once the agent chooses the wrong action, every later decision occurs inside the state that mistake created.
The HR termination case shows it clearly.
|
|
The handbook required written authorization from one of two named people before any involuntary offboarding. The inbox contained a termination request from a vice president who was not one of them.
The agent searched for the required authorization and found none.
It proceeded anyway.
It filed the termination ticket, revoked access, requested final pay, announced the separation, and updated the employee roster.
One wrong decision created several additional violations. Some actions could require expensive reversal. Others, such as sent messages or exposed information, could not be fully undone.
|
|
This does not further reduce the binary strict-success score after the first critical failure. The run has already failed.
It changes the severity, recovery cost, and number of downstream violations.
The HR case represents the severe end of the failure distribution. Forgiving one failed criterion would not rescue it because the initial mistake produced several prohibited outcomes.
By contrast, the benchmark's large increase under one-error-tolerant grading suggests that many other failed runs sit only one criterion away from passing.
Long-horizon evaluation therefore needs to measure both:
- Whether the agent failed
- What the first failure caused afterward
What to Do About It
Each failure mechanism points to a different control.
If errors compound across a long chain, shorten the chain.
If the policy loses influence, move the relevant rule closer to the decision.
If compression can remove a binding constraint, keep hard rules outside the working context.
If one wrong action can change the environment, place a gate before the action.
One control matters across all four: do not trust the agent's final report as proof that it followed the policy.
HANDBOOK.md finds that failed runs often end with confident claims of compliance, sometimes citing the same rules the agent violated. Verify the actual tool trace and final environment state instead.
Keep this checklist:
- Shorten the chain. Split long workflows into smaller stages with checkpoints.
- Move the rule to the decision. Re-surface the relevant constraint before execution.
- Require evidence. Record the rule, source, evidence, and decision for critical checks.
- Protect hard constraints. Do not let summaries rewrite or remove binding policies.
- Gate irreversible actions. Add approval before payments, deletions, access changes, or external messages.
- Verify the end state. Check what changed, not what the agent claims it changed.
These controls do not eliminate long-horizon failure. They stop one hidden mistake from controlling the rest of the trajectory.
|
|
What the benchmark shows, and what it does not
HANDBOOK.md shows a clear failure mode: a policy can remain fully available and still fail to govern the agent.
Models override standing rules with nearby requests. They ignore checks they completed, skip checks entirely, take prohibited actions, and report compliance that the tool trace does not support.
The mathematics explains why longer tasks amplify these failures.
Compounding error reduces the probability that every critical decision succeeds. Context competition weakens the influence of a fixed rule as the trajectory expands. Context cost creates pressure to remove information. Irreversible actions turn one bad decision into a changed environment and a larger failure cascade.
These mechanisms do not explain the benchmark's 36.2% score quantitatively. HANDBOOK.md does not isolate how much each one contributes. They establish something more basic: long-horizon reliability is not a property of the model alone.
It is a property of the entire control system around it.
A larger context window can store more rules. More reasoning can inspect them for longer. Neither guarantees that the rule controls the action that matters.
That requires checkpoints, source evidence, protected constraints, action gates, and independent verification of the final state.
The question is no longer whether the agent can find the policy.
It is whether the system can make the agent prove that each consequential action follows it.
A rule that cannot stop an action is not a control.