# Resurrecting Shards

> Undo-close for recently closed shards. Bring back a shard you closed by accident, with its name, color, isolation, and agent session restored.

Closed a shard you didn't mean to? crystl keeps a short **undo-close list** for each gem, so you can bring a recently closed **local** shard back — with its name, color, and best-effort isolation and agent session intact.

This is separate from the automatic session restore that brings your gems and shards back when you relaunch crystl. Resurrection is an explicit *undo-close* for shards you've closed during a session.

## What gets remembered

When you close a local shard, crystl records it in that gem's resurrect list **before** it goes. Each entry remembers the shard's:

- **name and color** — the crystal it carried in the shard bar
- **isolation state** — whether it was an [isolated shard](/docs/isolated-sessions) backed by a git worktree, restored best-effort
- **agent session** — the agent session it was running, resumed best-effort so you pick up where you left off. Claude Code (`claude --resume`), Codex (`codex resume`), and Antigravity (`agy --conversation`) all reopen their actual conversation; agents without a resume mechanism (or when the saved conversation is gone) start the agent fresh instead, with a note saying so

**Quest party members and remote shards are skipped** — they aren't tracked for resurrection.

## Bringing a shard back

Resurrection lives in the [crystl CLI](/docs/cli#resurrect). Listing what's available is read-only and **free**; the resurrect action itself changes state, so it's a [Guild](/pricing) control command.

```bash
crystl resurrect list --gem myapp          # see what can be brought back
crystl resurrect --gem myapp               # bring back the most recently closed shard
crystl resurrect --gem myapp --shard opal  # bring back a specific one by name
```

Without `--shard`, crystl resurrects the **most recent** entry. See the [CLI reference](/docs/cli#resurrect) for every flag, the `--json` output, and the HTTP API (`GET`/`POST /api/v1/gems/:id/resurrect`).

---
Source: https://crystl.dev/docs/resurrect-shards/
