# agent archived the whole pipeline when the req closed - reopening the job didn't restore the candidates

## TL;DR

Closing the req hard-archived every candidate, and reopening created an empty req. Make close a soft state: candidates stay attached but hidden, and reopen restores the full pipeline. Destructive actions on close need a confirmation and a restore path.

```text
agent archived the whole pipeline on req close - reopen didn't restore candidates
```

## Steps

1. Assess the loss: list archived candidates from the audit log or backups.
   Expected: You know who was in the pipeline.

2. Restore the candidates to the reopened req from the archive.
   Expected: The pipeline is whole again.

3. Change close to soft-close: set a closed flag, keep candidate associations.
   Expected: Close stops destroying data.

4. Require explicit confirmation (and a human) for hard-delete archival.
   Expected: Destruction is deliberate.

5. Test the close/reopen round trip in a sandbox before shipping the fix.
   Expected: The cycle preserves data.

## When to use

- reopening a req shows an empty pipeline
- close triggers archival
- candidates vanished on close

## When not to use

- the req was intentionally purged for compliance (then archival is correct)
- candidates were moved, not archived (check the move log)
- the req was never closed (different data-loss cause)

## Tool compatibility

- any ATS with req lifecycle
- soft-delete patterns

## Variant phrasings

- "archived pipeline on req close"
- "reopen job lost candidates"
- "close req deleted candidates"

## Why it happens

The agent treated 'close req' as 'clean up everything', but pipelines are the record of months of work. Reopened reqs are common (hiring freezes thaw), and an empty pipeline on reopen means re-sourcing from scratch. Close should hide, not destroy.

## Edge cases

- compliance purges are the exception; they need their own explicit flow
- soft-closed reqs still count in some reports; filter them
- the audit log is the restore source of truth; verify it records archival

## Provenance

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