vibivibi

Guides · Pi

How to back up and restore Pi agent sessions

Pi writes each session to a file in your home directory. Like the other agents, that file lives on one machine only.

vibi backs those files up encrypted, restores them with their original names so pi --session opens them, and sends them to teammates.

Where Pi keeps sessions

~/.pi/agent/sessions/<name>.jsonl
one file per session, one JSON record per line; the first record describes the session and its working directory
  • vibi takes the session id from the session record, or from the end of the file name when there is none.
  • The title is the first user message.

How sessions get lost

  • A new or reinstalled machine.
  • Deleting old session files.
  • A teammate who wants to see what the agent did.

Back up Pi sessions

vibi is a single executable for macOS, Linux and Windows; nothing else to install, no root.

curl -fsSL https://vibivibi.com/install.sh | sh
  1. Install vibi and enroll the machine once.
  2. In the project directory, run the picker; Pi sessions whose working directory is that project are listed.
    vibi push
  3. Choose Sync; the file is encrypted locally and uploaded, and later pushes add versions.

Restore on another machine

  1. Enroll the other machine and pick the session.
    vibi pull
  2. vibi writes the file back under ~/.pi/agent/sessions/ with its original name.
    pi --session ~/.pi/agent/sessions/<name>.jsonl

Share a session with a teammate

  • In the picker choose Send and type their email. The session is encrypted for their key on your machine; they see it in their inbox and pull it with their own password.
  • If the address has no vibivibi account yet, vibi makes a provisional key for them, shows you a one-time passphrase before anything is uploaded, and emails them an invitation. They sign up, enroll a machine, and type the passphrase once.
  • Sending again after more work adds a version; recipients keep the one they were sent.

What is encrypted

The session content, its title, working directory and model name are encrypted on your machine with a key only you and your recipients hold (X25519, HKDF-SHA256, AES-256-GCM; the private key is wrapped with your encryption password). vibivibi stores the ciphertext, its size, a fingerprint of the key, the agent kind and the optional plain-text name you give a session. The client is open source, so this can be checked: github.com/subconscious-systems/vibi-cli.

Questions

Where are Pi sessions stored?
Under ~/.pi/agent/sessions/, one .jsonl file per session.
How do I open a restored Pi session?
Run pi --session with the path of the restored file; vibi prints the exact command after a pull.
Can I share a Pi session with someone who does not use vibivibi yet?
Yes. vibi makes them a provisional key, shows you a passphrase before uploading and emails them an invitation; they sign up, enroll, enter the passphrase once and pull the session.

Other agents: Claude Code · Codex CLI · OpenCode. Start with the free plan: 200 MB of encrypted sessions, two machines, unlimited sends.

How to back up and restore Pi agent sessions · vibivibi