State De-duplication: Breaking Execution Loops

Reliability · updated Tue Feb 24

Preventing agents from repeating identical action-input pairs.

Steps

  1. Hash the last 3 'Action + Input' pairs in session state.
  2. Compare candidate actions against the hash set before execution.
  3. Trigger a temperature spike (0.7+) if a repeat is detected.
  4. Mandate a 'State Reflection' turn to identify the failure cause.
  5. Hard-terminate the chain after 2 subsequent failed unique attempts.

view raw JSON →