## TL;DR
Summarise runs in groups, never as one prompt: a full sweep of Guild runs overflows the context, so aggregate run metrics with a script into a per-configuration table, and give the agent the table plus the few runs worth individual reading. Sweep summaries are statistics problems. The agent adds value interpreting the aggregated table; it cannot add value holding five hundred raw run records.

```text
context overflow when agent tried to summarize guild runs for full sweep error failed
```

## Use this when
- The check or run fails with this symptom: a context overflow when an agent tries to summarise Guild runs for a full sweep.
- You are working on an agent workflow summarising Guild AI sweep results and the failure repeats on the same data or configuration.
- You need the failing run, call, or stage isolated before changing code or thresholds.

## Not for this skill when
- A small sweep whose runs fit in context comfortably, where aggregation is still tidy but not required.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Export the sweep runs to a file and count them. Verify: the run count and the fields per run are known
2. Aggregate by configuration with a script: best, mean, and count per configuration. Verify: a compact table replaces the raw runs
3. Select the top and the anomalous configurations for individual inspection. Verify: a short list of runs gets full detail reads
4. Build the summary from the table and the inspected runs. Verify: every configuration is represented with its numbers
5. Save the aggregated table with the summary. Verify: the next sweep diffs tables instead of re-reading runs

## Variant phrasings
### context overflow summarize guild runs full sweep failed
The shorter phrasing focused on the named failure.
### agent summarise guild sweep context error
The symptom phrasing a searcher tries next.
### guild sweep aggregation summary fix
The variant naming the failing stage or tool directly.

Compatibility: Guild AI run exports, agent summarisation workflows for sweeps

## Why it happens
Sweeps exist to produce many runs, and summarisation prompts grow linearly with them. The overflow arrives at exactly the sweep sizes that matter, and truncation drops runs silently, biasing the summary toward whichever runs happened to sort first.

## Edge cases / pitfalls
- Keep failed and crashed runs in the aggregate with their own status; dropping them flatters every configuration.
- State the aggregation rule in the summary so configuration comparisons are reproducible.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_4bpP-MCCRN5O70d3x6biDQ
