ALEF-PAT-040

bounded-iteration-without-progressive-state-preservation

execute × restart-from-scratch · severity 6 · confidence 0.86 · ref: n/a (related to OWASP-LLM06 'Excessive Agency' but distinct)

Loop hits iteration cap, restarts from initial state. All intermediate work lost; no checkpoint.

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."
}

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