> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentgg.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Resume and reports

> What makes a re-run reuse prior work, when to force a fresh pass, and the shape of a scan's reports.

A scan checks disk before it calls the model, at three levels:

* **Agent level.** An agent whose last run matches the current scope skips entirely. Its findings come from disk instead of a fresh call.
* **File level.** Inside an agent that did not finish, each file resumes alone when its content and the recon brief match the copy on disk.
* **Finding level.** The validate and score phases skip a finding that already carries a verdict or a score.

## What breaks resume

| Change                                             | Effect                                                                          |
| -------------------------------------------------- | ------------------------------------------------------------------------------- |
| A file's content                                   | That file re-runs. Other unchanged files in the same agent stay cached.         |
| `--diff`, `--exclude`, `--only`, `--max-file-size` | Every agent's cached run no longer fits its prior scope, so all of them re-run. |
| The recon brief, after `--re-recon`                | Every agent and the precondition plan re-run.                                   |

## `--source-id`

Resume state is keyed to a source identity. By default, that identity is the absolute path of the scan root. That breaks the moment the codebase moves to a different path. A fresh checkout in a build job does this. So does a container mount that gets a new path each run.

Pass `--source-id <id>` with a label you pick, and resume follows that label instead of the path. Use one id per codebase. Two codebases under the same id will read each other's cached findings.

## When to force a fresh pass

* `--rescan` re-analyzes every file even when its content and the recon brief have not changed. Use it after an agent's own template changes, since resume does not track that.
* `--re-recon` re-runs recon and the precondition plan even when a cached brief still matches the project. Use it after the project's stack changes enough that the old brief no longer fits. Also use it after an agent was wrongly skipped.
* `--revalidate-all` and `--rescore` do the same for findings that already carry a verdict or a score.

## Reports

A finished scan writes `summary.md` and one markdown file per finding under `findings/`, both inside `--output`. `agentgg summary <dir>` writes the same output later from files already on disk, with no calls to the model. This is what `--no-summary` defers to. See [Commands](/cli/reference/commands) for both.

### summary.md

* The scan root, start time, end time, and duration.
* Files scanned and the total finding count.
* The number of duplicates folded into a primary finding, if any.
* Findings grouped by agent, by validation verdict, and by severity.
* A linked list of every finding, sorted by severity then score.

### One finding file

```
# <title>

**Agent:** `sql-injection`
**Vuln class:** `sql-injection`
**File:** `src/login.ts`
**Lines:** 12-14
**Confidence:** 90%
**Severity:** HIGH
**CVSS:** 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
**Validation:** `confirmed`

### Validation
### Summary
### Details
### PoC
### Impact
### References
```

A finding that folds duplicates adds a **Duplicates collapsed** section that lists each one and why it got folded in.
