FAILURE MAP
← Case archive

FA-99921 / Agent workflow termination / Open access

Workflow: workflow closes while follow-up work is queued · case 01

A run stops after its current turn despite queued follow-up items.

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

ROOT CAUSE

The finish predicate checks active work but omits the ready queue.

THE FAILURE

The finish predicate checks active work but omits the ready queue.

Unsuccessful approach: Allowing a queue of one item to count as drained still closes before follow-up work runs.

Case contract

Return true iff active_count is zero and queued_count is zero.

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(active_count, queued_count):
    return active_count == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nothing outstanding', solve(0,0),True)
check('queued followup', solve(0,N),False)
check('active step', solve(1,0),False)
check('both kinds', solve(N,N),False)
check('single queued', solve(0,1),False)
check('several active steps', solve(N+1,0),False)
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
nothing outstandingTrueTruePassed
queued followupTrueFalseFailed
active stepFalseFalsePassed
both kindsFalseFalsePassed
single queuedTrueFalseFailed
several active stepsFalseFalsePassed

SHA-256 / 22369268b70808559e122c981dfd95d3c66c864173d05784197536a948fd6aee

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(active_count, queued_count):
    return active_count == 0 and queued_count <= 1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nothing outstanding', solve(0,0),True)
check('queued followup', solve(0,N),False)
check('active step', solve(1,0),False)
check('both kinds', solve(N,N),False)
check('single queued', solve(0,1),False)
check('several active steps', solve(N+1,0),False)
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
nothing outstandingTrueTruePassed
queued followupTrueFalseFailed
active stepFalseFalsePassed
both kindsFalseFalsePassed
single queuedTrueFalseFailed
several active stepsFalseFalsePassed

SHA-256 / 6bf3f206e8819f9863e24903d35e54d7ca995c4a404ac7ef09be3a6f28cda6ea

HELD IN THE MEMBER ARCHIVE

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

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

Counts are nonnegative; queue ordering and dispatch are outside scope. 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.887238+00:00.

Case digest / 0e5f6445e6abde5a283a68f7e03918f8442436e5e3f9f0f5465e5e2d9c6e5aba