H2: Missing Constraint Scaffolding #
An instruction asks for repeated effort without a usable stopping condition or retry budget.
Applies to: Recognized prompts and instruction bodies; host-agent tool constraints. Manual repair; no automatic fix for this example.
What triggers it #
Selected unbounded retry/continuation phrases emit CRITICAL. A host-agent prompt with tools but no recognized termination condition, retry budget, or progress check emits HIGH. Server manifests do not inherit host-agent retry requirements.
How to repair it #
State the attempt limit and what happens after it is exhausted. Keep the bound in the same sentence as a retry instruction where possible.
Reproduce the finding #
Use uv and Python 3.10+, plus curl. Run the examples in a scratch directory.
{
"system_prompt": "Retry the request. Keep trying until the request succeeds."
}
curl -fsS https://lintlang.ai/examples/rules/h2-bad.json -o h2-bad.json
uvx --from lintlang==0.8.0 lintlang scan h2-bad.json --format json
Expected with 0.8.0: the JSON report includes H2, severity CRITICAL.
Improved example #
Download the improved example.
{
"system_prompt": "Retry the request at most 3 times. If it still fails, stop and report the final error."
}
curl -fsS https://lintlang.ai/examples/rules/h2-improved.json -o h2-improved.json
uvx --from lintlang==0.8.0 lintlang scan h2-improved.json --format json
Expected with 0.8.0: H2 is absent. Other diagnostics may still appear; this repair targets the rule above.
Both commands use advisory mode: a finding does not itself make the command fail. To fail CI on HIGH or CRITICAL findings, add --fail-on fail. --fail-on review also gates MEDIUM. See outputs and exit codes.
Detection details #
Released H2 detection contract and scope
Checks for selected missing termination conditions, unbounded retry language
such as "keep trying until", negative termination such as "don't stop until",
"continue until" without limits, "retrying / try again / repeat until", and
missing retry budgets. A match is not reported when the same sentence states a
bound (max_iterations, "at most", "up to 3", "5 attempts", a timeout) or when
"loop" is a noun being described ("block the agent loop until answered"). These are static
indicators, not a proof that a loop will or will not terminate.