FA-99861 / Agent workflow termination / Open access
Workflow: tool-call allowance counts issued calls only · case 01
The loop issues too many tools when some requests are still in flight.
ROOT CAUSE
The budget check subtracts completed calls but not pending calls.
THE FAILURE
The budget check subtracts completed calls but not pending calls.
Unsuccessful approach: Counting pending calls twice rejects work that still fits the budget.
Case contract
Return whether one more call can be issued when completed + pending is strictly below 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(completed, pending, limit):
return completed < limit
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('all budget free', solve(0,0,N),True)
check('pending consumes last slot', solve(N-1,1,N),False)
check('one slot remains', solve(0,1,N+1),True)
check('single pending with room', solve(0,1,2),True)
check('limit exhausted', solve(N,0,N),False)
check('zero limit', solve(0,0,0),False)
check('completed calls', solve(1,0,1),False)
check('empty counters', solve(0,0,1),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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| all budget free | True | True | Passed |
| pending consumes last slot | True | False | Failed |
| one slot remains | True | True | Passed |
| single pending with room | True | True | Passed |
| limit exhausted | False | False | Passed |
| zero limit | False | False | Passed |
| completed calls | False | False | Passed |
| empty counters | True | True | Passed |
SHA-256 / 08b22ee96a8a435266b33b2f64ed7889e653d20e30d5f82fb3679a64db3df456
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(completed, pending, limit):
return completed + 2*pending < limit
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('all budget free', solve(0,0,N),True)
check('pending consumes last slot', solve(N-1,1,N),False)
check('one slot remains', solve(0,1,N+1),True)
check('single pending with room', solve(0,1,2),True)
check('limit exhausted', solve(N,0,N),False)
check('zero limit', solve(0,0,0),False)
check('completed calls', solve(1,0,1),False)
check('empty counters', solve(0,0,1),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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| all budget free | True | True | Passed |
| pending consumes last slot | False | False | Passed |
| one slot remains | False | True | Failed |
| single pending with room | False | True | Failed |
| limit exhausted | False | False | Passed |
| zero limit | False | False | Passed |
| completed calls | False | False | Passed |
| empty counters | True | True | Passed |
SHA-256 / 3101865f9bba708004fd0fd69851e96497c6ac771eded7306970eecd1b2b2b41
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
Counters are nonnegative integers and the limit is total calls per run. 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:28.969387+00:00.
Case digest / 5fa1b638c2700086454c9ce4898328c5d49c1844e15883944731ac54dbb1dc64