# agent loop detected regenerating the same executive summary after a failed render: how to fix it

An agent regenerating the same executive summary after a failed render is looping on the wrong fix: the render failed, not the writing. Check the render error first, fix the rendering problem, then regenerate once. Rewriting good text never fixes a broken renderer.

```text
agent loop detected regenerating the same executive summary after a failed render
```

## When to use this skill
- An agent rewrites content after render failures
- The text is fine but the render keeps failing

## When not to use this skill
- The render works and the text is bad (a writing issue)
- Renders fail for every document (a renderer issue)

## Tool compatibility
Agent document generation with render steps.
Related area: agent frameworks and agent runtime tooling.
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 an agent rewrites content after render failures, start at step 1 below.
- If instead the render works and the text is bad (a writing 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. Read the render error

```
Find the actual render failure message in the logs.
```
Expected: a specific render problem, not a writing problem.

### 2. Fix the render issue

```
Address the named cause, like a bad image or template error.
```
Expected: the renderer can now complete.

### 3. Regenerate once and render

```
Produce the summary a single time and render it.
```
Expected: a successful render.

### 4. Add a render-first guard

```
Make the agent check render health before any rewrite loop.
```
Expected: future failures fix rendering first.

## Confirm each step worked
Run through this checklist before moving on. If a check fails, redo that step instead of pushing ahead.
- Step 1 (read the render error): Expected: a specific render problem, not a writing problem.
- Step 2 (fix the render issue): Expected: the renderer can now complete.
- Step 3 (regenerate once and render): Expected: a successful render.
- Step 4 (add a render-first guard): Expected: future failures fix rendering first.

## Quick recap
1. Read the render error
2. Fix the render issue
3. Regenerate once and render
4. Add a render-first guard

## 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 regenerating after failed render
Fix the render, not the writing. If this matches what you saw, the steps above apply as written.

### executive summary rewrite loop
A render-first guard prevents the misdiagnosis. If this matches what you saw, the steps above apply as written.

## Why it happens
The agent misattributes the failure: it sees a failed output and assumes the text was bad. Each rewrite produces equivalent text that fails the same broken render, so the loop never converges.

## Edge cases
- Separate render errors from content errors in logging
- Cap regeneration attempts regardless of cause
- Test renders with static content to isolate renderer health

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_km1X6fUguV0UM4qvjRXz7Q
