State De-duplication: Breaking Execution Loops
Preventing agents from repeating identical action-input pairs.
Steps
- Hash the last 3 'Action + Input' pairs in session state.
- Compare candidate actions against the hash set before execution.
- Trigger a temperature spike (0.7+) if a repeat is detected.
- Mandate a 'State Reflection' turn to identify the failure cause.
- Hard-terminate the chain after 2 subsequent failed unique attempts.