FA-99851 / Agent workflow termination / Open access
Workflow: unrelated tool result clears the outstanding request · case 01
A run resumes after receiving a result for a different call identifier.
ROOT CAUSE
The result handler decrements pending work without matching request identity.
THE FAILURE
The result handler decrements pending work without matching request identity.
Unsuccessful approach: Handling only the first pending ID still leaves later results uncorrelated.
Case contract
Return sorted outstanding IDs after consuming result_id if present; unmatched results change nothing.
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(pending_ids, result_id):
return sorted(pending_ids[1:]) if pending_ids else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
ids=['c'+str(N),'d']
check('matching first', solve(ids,ids[0]),['d'])
check('matching second', solve(ids,'d'),[ids[0]])
check('unknown result', solve(ids,'x'),sorted(ids))
check('empty pending', solve([],'x'),[])
check('singleton match', solve(['only'],'only'),[])
check('singleton unrelated', solve(['only'],'x'),['only'])
check('unordered input', solve(['z','a'],'z'),['a'])
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 |
|---|---|---|---|
| matching first | ['d'] | ['d'] | Passed |
| matching second | ['d'] | ['c1'] | Failed |
| unknown result | ['d'] | ['c1', 'd'] | Failed |
| empty pending | [] | [] | Passed |
| singleton match | [] | [] | Passed |
| singleton unrelated | [] | ['only'] | Failed |
| unordered input | ['a'] | ['a'] | Passed |
SHA-256 / d36049ea5a05281a341e35316c2dae816c1ff4439c22a41acbc0f2a33b0cd314
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(pending_ids, result_id):
return sorted(x for x in pending_ids if x != result_id) if pending_ids and result_id == pending_ids[0] else sorted(pending_ids)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
ids=['c'+str(N),'d']
check('matching first', solve(ids,ids[0]),['d'])
check('matching second', solve(ids,'d'),[ids[0]])
check('unknown result', solve(ids,'x'),sorted(ids))
check('empty pending', solve([],'x'),[])
check('singleton match', solve(['only'],'only'),[])
check('singleton unrelated', solve(['only'],'x'),['only'])
check('unordered input', solve(['z','a'],'z'),['a'])
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 |
|---|---|---|---|
| matching first | ['d'] | ['d'] | Passed |
| matching second | ['c1', 'd'] | ['c1'] | Failed |
| unknown result | ['c1', 'd'] | ['c1', 'd'] | Passed |
| empty pending | [] | [] | Passed |
| singleton match | [] | [] | Passed |
| singleton unrelated | ['only'] | ['only'] | Passed |
| unordered input | ['a'] | ['a'] | Passed |
SHA-256 / 107368ea85333db74ab92b75741508f4a7e00afd0f75e123d06fb1cac5e609df
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
Call identifiers are unique strings within a 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.969379+00:00.
Case digest / b371174171b401ed2496e02d577116b9588694503dc1ba2c7f9d3f2fff0e9046