Restore a sessionAll docs ↓

Restore a session

Choose an archived session, restore its raw files to the harness store, then use the resume command Packbat prints.

Find the session

Run restore without an id to list this machine's archived sessions. Each line includes the id, harness, machine, file count, and newest source time. Pass --machine to list another archived machine.
$ packbat restore

Restore by id

Pass the full session id or an unambiguous prefix. Packbat refuses a prefix that matches more than one id, and refuses an id that exists in more than one harness.
$ packbat restore <id-or-prefix>

Put it back

The harness adapter maps every archived file back to its exact store location. Packbat creates missing parent directories and restores the original modified time. If a live file is newer, restore stops unless you pass --force.

Verify before writing

Before decompressing or writing, Packbat hashes the archived bytes and compares them with the checksum in the index. A mismatch stops the restore. Database snapshots get a second content checksum and harness validation before they replace an absent database.

Resume the harness

Put the file back and the harness resumes it. Packbat prints the command for that harness after the files are restored. For Claude Code, run it from the original project directory.
claude --resume <session-id>