FAILURE MAP
← Case archive

FA-99916 / Agent workflow termination / Open access

Workflow: budget exhaustion is reported as successful completion · case 01

A run with no remaining work is labeled completed despite having no final answer.

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

ROOT CAUSE

The finish reason is inferred from an empty queue alone.

THE FAILURE

The finish reason is inferred from an empty queue alone.

Unsuccessful approach: Prioritizing the budget label misclassifies a run that did produce its final answer.

Case contract

Given final_seen and remaining_steps, return complete when final_seen, budget_exhausted when steps are zero, else continue.

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(final_seen, remaining_steps):
    return 'complete' if remaining_steps == 0 else 'continue'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('final at exhausted budget', solve(True,0),'complete')
check('budget without final', solve(False,0),'budget_exhausted')
check('active without final', solve(False,N),'continue')
check('final with room', solve(True,N),'complete')
check('positive step', solve(False,1),'continue')
check('extra budget without final', solve(False,N+1),'continue')
check('answer wins', solve(True,1),'complete')
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
final at exhausted budgetcompletecompletePassed
budget without finalcompletebudget_exhaustedFailed
active without finalcontinuecontinuePassed
final with roomcontinuecompleteFailed
positive stepcontinuecontinuePassed
extra budget without finalcontinuecontinuePassed
answer winscontinuecompleteFailed

SHA-256 / 6be80ec96f0ce5eef881462f8ed672fc083c2b44d41cfda28a6d0594e1459290

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(final_seen, remaining_steps):
    return 'budget_exhausted' if remaining_steps == 0 else ('complete' if final_seen else 'continue')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('final at exhausted budget', solve(True,0),'complete')
check('budget without final', solve(False,0),'budget_exhausted')
check('active without final', solve(False,N),'continue')
check('final with room', solve(True,N),'complete')
check('positive step', solve(False,1),'continue')
check('extra budget without final', solve(False,N+1),'continue')
check('answer wins', solve(True,1),'complete')
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
final at exhausted budgetbudget_exhaustedcompleteFailed
budget without finalbudget_exhaustedbudget_exhaustedPassed
active without finalcontinuecontinuePassed
final with roomcompletecompletePassed
positive stepcontinuecontinuePassed
extra budget without finalcontinuecontinuePassed
answer winscompletecompletePassed

SHA-256 / d7fe2651f870976e495ad73777b0cf6dde1a2d101b297f91a0d7b120cac26b1d

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 7 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

remaining_steps is nonnegative; failure and cancellation reasons are outside this precedence rule. 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.449039+00:00.

Case digest / 5afa2c118f2ee54768e6025c3bace123cdaf4452805fc938b2bc72359b4c3048