ALEF-PAT-021

output-schema-no-loop-exit

execute × no-termination-criterion · severity 6 · confidence 0.85

Agent loop has a schema for partial outputs but no schema for "done". Iteration continues indefinitely or until quota; "done" is never expressible.

diagnosed in the wild

·

loading…

healed by ALEF

·

loading…

cited in posts

·

loading…

observable signature

{
  "behavior": "stopReason=toolUse AND tool.name==structured_output_tool AND loop continues"
}

fix archetypes

  • terminate-on-structured-toolcost: tiny

    if last tool call name == structured_output_tool, finalize(tool.input); do not re-prompt

compounds with

cite as

# In a PR description / issue / RFC:
fixes pattern ALEF-PAT-021 (output-schema-no-loop-exit)
ref: https://n50.io/patterns/021

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

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