---
name: unlose
description: Capture, verify, and recover local Claude Code and Codex session capsules. Use when a user asks to protect sessions, inspect what is protected, restore a capsule, or continue a recovered session.
---

# unlose — session recovery

Use the local CLI with `--json` for non-interactive commands.

## First-time setup (human only)

Fresh `unlose init` displays the only recovery code and waits for confirmation that it was saved. A human must complete that ceremony in a real interactive TTY. Do not run fresh init autonomously or add `--json`.

Ask the human to run:

```sh
npx unlose init
```

It signs in and connects to https://unlose.sh by default.

For Google sign-in, the human adds `--provider google`.

## Safe operations

- Protect current sessions: `unlose snap --json`
- Inspect protection: `unlose status --json`
- Find a session: `unlose list --json --query "<text>"`
- Verify integrity: `unlose verify --json`
- Exact recovery: `unlose restore <id> --json [--to <dir>]`
- Native continuation: `unlose continue <id>` (interactive human terminal)

Never pass `--force` without explicit user confirmation. Never request or expose a recovery code, session token, complete share link, transcript, or environment file.
