agent loop detected: repeatedly describing the same failed deploy in triage
Breaks the autonomous triage loop where an agent keeps describing the same failed Workers deploy without taking new diagnostic action. Covers the seen-states error-signature list, the one-new-action-per-pass rule, and the three-pass escalation cap. Use when triage output repeats with no new evidence. Key trigger: three or more triage rounds producing summaries but no new commands or checks.
TL;DR: Ban the summary-only triage pass. Every triage round must end with exactly one new diagnostic action - a command to run, a log to pull, a diff to inspect - and the agent must keep a seen-states list of error signatures. After three passes with no new evidence, it escalates or changes strategy instead of writing a fourth description. Summaries feel like progress but change nothing.
agent loop detected: repeatedly describing the same failed deploy in triageSteps
- Write the current hypothesis as one sentence, plus the single command that would prove it wrong. Expected: you have a falsifiable command, not a paragraph of description.
- Start a seen-states list. After each pass, append the error signature: the first line of the error plus which step failed. Expected: if a new pass produces a signature already in the list, it is declared a loop and no new summary is written.
- Require every pass to end with exactly one new diagnostic action. Expected: each action returns output you have not seen yet - a new log line, a new command result, a diff.
- Diff the deploy output between passes instead of re-reading it. Expected: the diff shows whether anything actually changed since the last pass.
- Cap it: three passes with no new evidence means escalate. Either switch the repair layer (config vs code vs account vs network) or report back with the evidence gathered. Expected: the agent never writes a fourth identical summary.
- Log the loop break explicitly: what was tried, what the evidence showed, what changed. Expected: the next agent (or the next run) starts from evidence, not from zero.
Use this when
- triage passes produce descriptions of the failed deploy but no new commands or checks
- the agent's output reads the same on pass 4 as on pass 1
- a deploy failure has been "analyzed" multiple times with no repair attempted
- you need a forcing function that turns observation into action
Not for this skill when
- the failure is already diagnosed and just needs the fix applied - skip triage, apply it
- each pass genuinely uncovers new evidence - that's working triage, not a loop
- the deploy error changes between passes - the loop is already broken
- a human is driving - this guard is for autonomous runs
Variant phrasings
- agent keeps summarizing the failed deploy without acting
- triage loop with no new diagnostic steps
- agent describes the same Workers deploy failure every pass
- analysis paralysis on a failed Cloudflare deploy
Why it happens
Summarization is cheap and reads like progress, so an agent with no forcing function re-derives the same conclusion forever. Triage is a state machine - hypothesis, test, evidence, next hypothesis - and without the seen-states list and the action requirement, there's nothing pushing the state forward.
Edge cases
- A genuinely novel failure can look like a loop for two passes. The three-pass cap with the layer-switch rule handles this: new layer, new evidence.
- Don't confuse "same root cause, new evidence" with a loop. The signature list tracks evidence, not conclusions.
- If the deploy output is nondeterministic (flaky), diffing misleads. Note the flakiness explicitly and triage the flake, not the deploy.
- Long runs lose the seen-states list if it only lives in context. Persist it to the run's working files.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_ezT4VLgZmBDxJHm39iwq6Q