# agent loop detected retrying failed loopio login: how to fix it

A wrong credential or expired SSO makes every login attempt fail identically, and a naive retry loop never learns. Cap login retries at three, capture the auth error message, and escalate to a human with the exact error.

```text
agent loop detected retrying failed loopio login
```

## When to use this skill
- Agent retries Loopio login dozens of times
- Agent log shows identical login failures in a loop

## When not to use this skill
- Login succeeds but is slow (a performance issue)
- Login fails once with a clear error (a credentials issue, not a loop)

## Tool compatibility
Agent login retry loops. Related area: agent frameworks.

Related area: proposal automation and agent-assisted RFP workflows.

Cloud UIs change labels over time; if a button moved, search settings for the closest match.

## Before you start
- Sign in to the tool and keep one tab open so sessions stay clean
- Copy the exact error text and note the time it happened
- Set aside 15 to 20 minutes; most of these resolve in a single pass

## Quick diagnosis
Make sure this is the right skill before you invest the 15 minutes.
- If you are dealing with agent retries Loopio login dozens of times, start at step 1 below.
- If instead login succeeds but is slow (a performance issue), stop here; you need a different skill.
- If neither quite matches, compare your screen against the verbatim error block at the top; that block is exactly what this skill covers.

## Fix it in steps
### 1. Cap login retries at three

```
Set a hard limit of three login attempts per run.
```
Expected: Expected: run stops retrying after the third failure.

### 2. Capture the auth error text

```
Save the exact error message from the failed login.
```
Expected: Expected: error text names the cause, like expired SSO.

### 3. Stop and report the cause

```
End the run with the captured error instead of looping.
```
Expected: Expected: run exits cleanly with a clear failure reason.

### 4. Human fixes the credential

```
A human refreshes the credential or SSO session.
```
Expected: Expected: next run logs in on the first attempt.

## Confirm each step worked
Run through this checklist before moving on. If a check fails, redo that step instead of pushing ahead.
- Step 1 (cap login retries at three): Expected: expected: run stops retrying after the third failure.
- Step 2 (capture the auth error text): Expected: expected: error text names the cause, like expired SSO.
- Step 3 (stop and report the cause): Expected: expected: run exits cleanly with a clear failure reason.
- Step 4 (human fixes the credential): Expected: expected: next run logs in on the first attempt.

## Quick recap
1. Cap login retries at three
2. Capture the auth error text
3. Stop and report the cause
4. Human fixes the credential

## Still stuck?
Gather three things: the exact error text, the time it happened, and what changed just before it broke.
Check the vendor status page for an active incident. Then open a support ticket with those three things;
it cuts the back-and-forth in half. For agent runs, attach the last 50 lines of the agent log too,
since the loop or timeout signature in the log usually names the cause.

## Variant phrasings
### agent loop loopio login
Retry cap plus error capture fixes it. If this matches what you saw, the steps above apply as written.

### agent retrying failed login loop
Surface the auth error instead. If this matches what you saw, the steps above apply as written.

## Why it happens
Identical failures on identical inputs never succeed on retry, but agents without a retry budget keep trying. Capturing the error text turns a mystery loop into a named auth problem a human can fix in minutes.

## Edge cases
- Distinguish auth failures from network blips; only network blips deserve retries
- Log the attempt count in the run summary so loops are visible
- SSO sessions expire on their own schedule; refresh proactively before big runs

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_QE1zbnQB-TwVSxKz1uVzGQ
