Skip to content

Requirement 2.7's crash-loop ladder is blind to a death before any stage starts

Id: TD-PPagop-26081302 · Status: resolved · Filed: 2026-08-13 · Resolved: 2026-08-14 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/347

Requirement 2.7’s crash_loop_verdict (lib/crash-loop.sh) only counts Co-Ordinator attempt-failed events. A cycle that dies while building its own runtime input — before stage-start for any stage is ever logged — writes no such event: the union log shows only a cycle-start / cycle-end(<nonzero>) pair, and the ladder never fires no matter how many consecutive times it happens.

This is not hypothetical: it is exactly the shape of the 2026-08-01 argv-cap outage (the assembled Co-Ordinator prompt crossed MAX_ARG_STRLEN) and the 2026-08-12 one (the void extract crossed it before requirement 4g’s stdin fix landed) — execve failed at Argument list too long before the Co-Ordinator process ever started, so nothing pinned stage: coordinator on anything. Both outages ran for hours across every node in the fleet before a human noticed, with the dashboard showing a healthy idle fleet the whole time.

Extend crash_loop_verdict (or add a companion check the Script runs alongside it) to also treat a run of consecutive cycles that each logged cycle-start followed by a cycle-end with a non-zero exit_code and no stage-start anywhere in between as the same class of failure — grouping by the exit_code (or another cheap, stable fingerprint of the failure, since a pre-selection death carries no detail field to compare) the way the existing rule groups by attempt-failed’s detail. This needs:

  • a new pure reader in lib/crash-loop.sh (or an extension of crash_loop_verdict itself) that walks the union log for the cycle-start/cycle-end-nonzero/no-stage-start pattern per cycle id;
    • a decision on what “identical” means for this class, since there is no detail string to compare — exit_code alone, or a hash of whatever diagnostic the Script can cheaply attach to cycle-end on this path;
    • wiring into the same escalation call site (agent-cycle.sh, requirement 2.7’s own block) so both classes escalate through one issue-filing path, not two;
    • test coverage mirroring test/crash-loop.test.sh’s existing shape, for the new detection path specifically.

Filed as a split-out from Poetic-Poems/agent-ops#309’s acceptance criterion 4 rather than folded into #309’s own fix, to keep that pull request scoped to the void-extract growth it was about; this is a distinct gap in the crash-loop ladder that happens to have been surfaced by the same outage.