Guides · Claude Code
How to back up, sync and share Claude Code sessions
Claude Code keeps every conversation as a transcript file on the machine it ran on. Move to another computer, reinstall, or clean up the home directory, and the session is gone, together with the context the agent had built up.
vibi backs those transcripts up encrypted, puts them back where Claude Code looks for them on any machine you enroll, and sends them to teammates who then resume the same conversation.
Where Claude Code keeps sessions
- ~/.claude/projects/<project>/<session-id>.jsonl
- the transcript, one JSON record per line; <project> is the project directory path with every character that is not a letter or digit replaced by a dash
- ~/.claude/history.jsonl
- an index of sessions with their titles and project directories
- The file name is the session id, which is what claude --resume <id> takes.
- Sessions started from the VS Code extension or the SDK are not always listed in history.jsonl, so vibi reads the transcript files themselves.
- Subagent transcripts under a subagents/ folder belong to their parent session and are not backed up on their own.
How sessions get lost
- A new laptop, or a reinstalled one: the ~/.claude directory is not part of any sync by default.
- Clearing the home directory to free space.
- Renaming or moving the project directory: the transcript stays under the old encoded path and Claude Code no longer finds it from the new one.
Back up Claude Code 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
- Install vibi and enroll the machine once (two commands; the Quick start in the dashboard walks through it).
- In the project directory, run the picker. It lists the Claude Code sessions started there, newest first.
vibi push
- Choose Sync. The transcript is encrypted on your machine and uploaded; the server never sees the content. Push again after more work and a new version is kept next to the old one.
- For scripts and cron jobs there is a non-interactive form.
vibi push --session 1 --sync
Restore on another machine
- Enroll the other machine with a new code from the dashboard; it unlocks with the same encryption password.
- Go to the project directory there and pick the session.
cd ~/code/my-project && vibi pull
- vibi writes the transcript under ~/.claude/projects/ for that directory, so Claude Code resumes it as if it had never left.
claude --resume <session-id>
- A specific older version, or a different project directory, are one flag away.
vibi pull <id> --rev 2 --into ~/code/other-project
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 does Claude Code store conversations?
- Under ~/.claude/projects/, one folder per project directory (the path with non-alphanumeric characters turned into dashes) and one .jsonl file per session, named by the session id. ~/.claude/history.jsonl indexes them.
- Can I resume a Claude Code session on another computer?
- Yes. Back it up with vibi push, then on the other machine run vibi pull inside the project directory and claude --resume <session-id>. The transcript lands exactly where Claude Code expects it.
- Does the backup include the code in my repository?
- No. Only the agent transcript is backed up: the conversation, tool calls and results as Claude Code recorded them. Your repository is yours to version with git as usual.
- Is the transcript readable by vibivibi?
- No. It is encrypted on your machine with a key only you hold; the service stores ciphertext, the size and a fingerprint of the key. Titles and working directories are encrypted too.
Other agents: Codex CLI · OpenCode · Pi. Start with the free plan: 200 MB of encrypted sessions, two machines, unlimited sends.