FAILURE MAP
← Case archive

FA-99911 / Agent workflow termination / Open access

Workflow: error limit ignores a successful turn between errors · case 01

Separated tool errors trigger a consecutive-error stop.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The implementation totals errors across the entire workflow.

THE FAILURE

The implementation totals errors across the entire workflow.

Unsuccessful approach: Looking only at the most recent outcome misses an exhausted multi-error streak.

Case contract

Return true iff the number of trailing error outcomes is at least limit.

Why this case matters

This toy decision rule isolates one bounded agent-loop completion contract.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(outcomes, limit):
    return outcomes.count('error') >= limit
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated errors', solve(['error','ok','error'],2),False)
check('trailing errors', solve(['ok']+['error']*N,N),True)
check('two errors at the tail', solve(['error','ok','error','error'],2),True)
check('empty outcomes', solve([],1),False)
check('limit one error', solve(['error'],1),True)
check('limit one success', solve(['ok'],1),False)
check('multi-error trailing run', solve(['ok','error','error'],2),True)
check('exact run', solve(['error']*N,N),True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
separated errorsTrueFalseFailed
trailing errorsTrueTruePassed
two errors at the tailTrueTruePassed
empty outcomesFalseFalsePassed
limit one errorTrueTruePassed
limit one successFalseFalsePassed
multi-error trailing runTrueTruePassed
exact runTrueTruePassed

SHA-256 / 1bd9ca9f4faf0e2ae4f4e18dc90486c1b8bbd18dd64a85bfa5f353abbcdbdfac

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(outcomes, limit):
    return bool(outcomes) and outcomes[-1] == 'error' and limit <= 1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated errors', solve(['error','ok','error'],2),False)
check('trailing errors', solve(['ok']+['error']*N,N),True)
check('two errors at the tail', solve(['error','ok','error','error'],2),True)
check('empty outcomes', solve([],1),False)
check('limit one error', solve(['error'],1),True)
check('limit one success', solve(['ok'],1),False)
check('multi-error trailing run', solve(['ok','error','error'],2),True)
check('exact run', solve(['error']*N,N),True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
separated errorsFalseFalsePassed
trailing errorsTrueTruePassed
two errors at the tailFalseTrueFailed
empty outcomesFalseFalsePassed
limit one errorTrueTruePassed
limit one successFalseFalsePassed
multi-error trailing runFalseTrueFailed
exact runTrueTruePassed

SHA-256 / d62de679d3dc32222b9548882e7a5ff3ba7f01d112b894656f95fc6dfddef8d0

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Outcomes use error for a failed turn and any other label for non-error. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-30T16:48:29.420400+00:00.

Case digest / 94a53a12cb271cf087b47a729c3dd2fb37a4c179e711c57286e02af68e74b09e