ALEF-PAT-040

bounded-iteration-without-progressive-state-preservation

execute × halt · severity 7 · confidence 0.77 · ref: n/a (related to OWASP-LLM06 'Excessive Agency' but distinct)

An autonomous agent runs with a hard iteration cap (e.g. max_iterations=20). When the cap fires mid-task, the agent does not preserve partial work (zero commits, zero modified files, no state checkpoint). The retry loop starts from scratch, repeating the same failure mode forever without progress. The cap is observable, the no-progress is observable, but the connection is invisible until pattern-matched.

diagnosed in the wild

·

loading…

healed by ALEF

·

loading…

cited in posts

·

loading…

observable signature

{
  "log_regex": "(?:max[_-]?iterations|iteration[_-]?cap)\\s*(?:hit|reached|cap-fire)",
  "alt_regex": [
    "commits-on-branch=0,\\s*modified-files=0,\\s*untracked-files=0",
    "agent.*will\\s+retry\\s+on\\s+a\\s+future\\s+tick"
  ],
  "behavior": "Bot leaves a comment like 'hit iteration cap, will retry'. Next tick: same failure. Repeat N times. Crucially, the agent has read+wrote during the failed run (e.g. Read=12 Bash=8 in autumngarage/sentinel#118 transcript) but emits zero artifacts because the cap fires before commit phase."
}

verified instances (2) — from the catalog

fix archetypes

  • commit_on_cap_firecost: small

    When iteration cap fires, the agent commits whatever partial work exists with a clear 'partial-progress-cap-fired' marker so the next run can resume rather than restart.

  • cost_budget_replaces_iteration_capcost: medium

    Replace max_iterations: 20 with a token/cost budget. Caps based on token spend are less arbitrary than caps based on tool-call count.

  • model_escalation_on_capcost: medium

    First cap -> retry with the same model. Second cap on same task -> escalate to a larger model. Third cap -> human handoff. Never silently retry-forever with identical configuration.

  • explicit_skip_on_repeat_failurecost: tiny

    After 3 cap-fires on the same task, the agent labels the issue agent-skip-please-human and stops picking it up. Visible, finite, recoverable.

cite as

# In a PR description / issue / RFC:
fixes pattern ALEF-PAT-040 (bounded-iteration-without-progressive-state-preservation)
ref: https://n50.io/patterns/040

# Machine query:
GET https://n50.io/api/patterns/040

# Scan your repo for this pattern:
npx @alef-prime/audit-agent-system . --pattern=040