## TL;DR
Fix this by acting on the exact problem first: stop the looping run, add a repeat guard that ends the step after two identical attempts with no new result, record the last successful result for the task to pull a vendor SOC 2 report into the risk record in the vendor record, and resume from the next step instead of the repeated one. Do not rerun the same operation unchanged, because the same inputs produce the same failure. Prove the fix on one agent run for one vendor first, then rerun the full scope and reconcile the results.

```text
agent stuck loop detected repeating the same step while trying to pull a vendor SOC 2 report into the risk record error failure
```

## Use this when
- The operation in the agent workflow fails with this exact problem: agent stuck loop detected repeating the same step while trying to pull a vendor SOC 2 report into the risk record error failure.
- The same failure repeats on retry with unchanged inputs.
- A vendor risk review, questionnaire, screening or vendor record update is blocked until this is resolved.

## Not for this skill when
- The notice is a platform outage from the vendor. Resolve that first, then return here if this problem remains.
- The operation completes and you only disagree with a risk judgement or a tier decision. That is a risk owner decision, not this failure.

## Steps
1. Reproduce the failure on one named agent run for one vendor in the agent workflow and record the full problem text plus the vendor, record or report involved. Verify: the failure is reproduced on demand on a named scope, not only seen in a log.
2. Apply the specific fix for this problem: stop the looping run, add a repeat guard that ends the step after two identical attempts with no new result, record the last successful result for the task to pull a vendor SOC 2 report into the risk record in the vendor record, and resume from the next step instead of the repeated one. Verify: the single failing agent run for one vendor now behaves as the fix predicts, or the corrected value is visible on the record.
3. Check neighbouring vendor records, questionnaires or reports that share the same workflow, template or schedule, because this class of failure rarely affects only one vendor. Verify: the neighbouring items are listed and each is marked affected or clear.
4. Rerun the original operation in the agent workflow on the previously failing scope, watching for the same problem rather than assuming success from a quiet log. Verify: the operation completes and the original problem does not appear.
5. Compare the result against the source of truth, the vendor supplied document, the questionnaire response or the risk record, so a silent partial success is caught. Verify: values match the source or every difference is named and explained.
6. Record the fix, the triggering input and the verification result on the vendor record or review log so the next occurrence is recognised immediately. Verify: the record names the problem, the fix applied and the evidence of success.

## Variant phrasings

### agent stuck loop detected repeating the same step while trying to pull a vendor SOC 2 report into the risk record error failure
The verbatim form searchers paste from the console, report or run log. Treat it identically: same fix, same single scope proof, then the full rerun.

### How to fix - agent stuck loop detected repeating the same step while trying to pull a vendor SOC 2 report into the risk record error failure
The how to phrasing for the same failure in the agent workflow. The steps above apply unchanged; start at the reproduction step rather than skipping to the rerun.

### The agent workflow troubleshooting for this failure
The symptom first phrasing used when the console hides the full problem. Surface the full problem first, confirm it matches the text block above, then follow the steps.

## Why it happens
An agent loops when its completion check never recognises the result it already produced, often because it waits on a page state or wording that does not change, so it repeats a successful step until the run is stopped.

## Edge cases
- The vendor record, questionnaire version or portal page changed after the failing run started. Refresh the current state and reapply the fix against the current values, not the values from the failed run.
- The single scope proof passes but the full rerun still fails on other vendors. Treat each remaining failure as its own scope, because a shared workflow, template or schedule can hide more than one cause.
- The source systems disagree on the correct value. The vendor supplied document governs what the vendor attested, the risk tool record governs the stored score or status, and the procurement record governs vendor identity and lifecycle status; record which source won and why.

Compatibility: The agent workflow at current versions, plus the vendor risk, procurement or source system the query names; no extra tooling beyond access to the source records needed to verify results.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_53KT3ra_j-q1Y2hw0ktO7g
