## TL;DR
Diff parameters by group, not all at once: 300 sweep trials carry thousands of parameter values, so compute the parameter diff with a script into a compact table of values that actually vary, and give the agent only the varying parameters. Most sweep parameters are constant across trials. The varying set is small, and it is the only part a human or an agent can reason about, so the diff should be computed, not read.

```text
context overflow error when agent tried to diff params for 300 sweep trials failure
```

## Use this when
- The check or run fails with this symptom: a context overflow when an agent tries to diff params for 300 sweep trials.
- You are working on an agent workflow analysing sweep trial parameters and 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 full parameter sets fit in context, where the computed diff is still cleaner 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 trial parameters to a file and count trials and parameters. Verify: the diff input size is known
2. Compute per-parameter distinct values across trials with a script. Verify: parameters with one value are set aside as constant
3. Build the agent input from the varying parameters table joined with trial outcomes. Verify: the input fits and focuses on what changed
4. Analyse which varying parameters track the outcome differences. Verify: the summary names the influential parameters with their ranges
5. Save the varying parameters table with the sweep record. Verify: later analyses reuse it instead of re-diffing

## Variant phrasings
### context overflow diff params 300 sweep trials failure
The shorter phrasing focused on the named failure.
### agent diff sweep params context error
The symptom phrasing a searcher tries next.
### sweep parameter diff computed table fix
The variant naming the failing stage or tool directly.

Compatibility: Sweep analysis for W&B, ClearML, and custom trial stores, agent context management

## Why it happens
Agents reach for raw records when a question is about variation. Raw parameter sets grow with trials times parameters, while the answer lives in a tiny projection of that data, so loading everything guarantees overflow at production sweep sizes and buries the signal even when it fits.

## Edge cases / pitfalls
- Include outcome columns in the projection; a parameter diff without results cannot support conclusions.
- Constant parameters still belong in the sweep record as context, listed once, not per trial.

## Provenance

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