## TL;DR
Fix the list parsing, because the archive never got its inputs: the agent failed to archive Determined AI experiments after the storage list parse failed, so read the experiment list through the API into structured records and archive from that verified list. Archiving is destructive enough that its input list must be exact. A parse failure upstream is a stop signal, and the agent correctly archived nothing; the bug is the parser, not caution.

```text
agent failed to archive Determined AI experiments after storage list parse error
```

## Use this when
- The check or run fails with this symptom: an agent fails to archive Determined AI experiments after a storage list parse error.
- You are working on an agent workflow archiving old Determined AI experiments based on a storage or experiment listing 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 list that parses but includes active experiments, where the selection criteria, not the parser, are the danger to fix first.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Capture the raw list output the parser choked on. Verify: the format or the truncation point is visible
2. Fetch the same list through the Determined API or a structured output format. Verify: experiments arrive as records with ids and states
3. Validate the archive candidates against the criteria, excluding anything active or recent. Verify: the candidate list is reviewed with counts
4. Archive a single test candidate and confirm the result. Verify: the archive path works end to end
5. Run the archive for the validated list, logging each outcome. Verify: every candidate shows archived or a stated reason

## Variant phrasings
### agent failed archive determined experiments storage list parse
The shorter phrasing focused on the named failure.
### determined archive list parse error agent
The symptom phrasing a searcher tries next.
### determined experiment archive structured list fix
The variant naming the failing stage or tool directly.

Compatibility: Determined AI experiment management APIs, agent archival workflows

## Why it happens
Agents often build destructive workflows on top of CLI text listings, because that is what a human would read. Text listings truncate, wrap, and change format across versions, so the parse layer fails first, and any workflow that proceeded anyway would be archiving from a guess.

## Edge cases / pitfalls
- Never let a destructive step consume a list that failed validation; the stop here is the pattern to keep.
- Dry run output for archival should list ids and ages, not just a count, so a human can spot a wrong inclusion.

## Provenance

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