Policy · critical
Prevent infinite LLM loops
Block tasks where the agent calls the model more than 5 times consecutively without any other action kind intervening. This catches agents stuck in a reasoning loop.
The policy
A few lines of YAML in your repository.
Part of Internal AI starter. Assign the pack, or copy this policy into a manifest of your own.
- Verdict
- Critical: the step is blocked before it runs, and an incident is opened.
- Checked
- Before every step, against everything the agent did earlier in the task.
- Rule
- max_consecutive_same_type
- name: "Prevent infinite LLM loops" description: | Block tasks where the agent calls the model more than 5 times consecutively without any other action kind intervening. This catches agents stuck in a reasoning loop. rule_type: max_consecutive_same_type params: kind: step.model max_consecutive: 5 severity: critical enforcement_point: step_executionHow the rule works
max_consecutive_same_type: Checks that no run of the same action kind exceeds a limit.
kind:step.model. Action kind whose consecutive runs are limited.max_consecutive:5. Maximum length of a consecutive run.
In these packs
- Internal AI starter, version 1.0.2
From Kyvvu's open policy library at github.com/Kyvvu/manifests, Apache 2.0.
Next
Watch it decide.
In your browser
Try it in the playground
The policy is loaded. Add the steps your agent takes and watch the engine decide, step by step.
On your machine
Five minutes, no account
kyvvu try runs a demo agent against the bundled baseline. Then assign this pack from the dashboard or the CLI.
For security teams
See it on your agents
A 30-minute demo on the agents you actually run, with the policies that fit them.