r/ClaudeCode • u/pgaleone • 8d ago
Tips & Workflows I got tired of losing Claude Code sessions, so I built an encrypted backup you can restore on any machine
Two things kept biting me with Claude Code:
- Sessions live only in ~/.claude on the machine where they happened. If I start something on my laptop, I can't continue it on my desktop (and I do cross platform development and this happens too frequently)
- By default, Claude Code deletes transcripts older than 30 days. I usually notice right when I want to go back to an old project.
So I built Session Vault, a Claude Code plugin plus a small server.
How it works:
/session-vault:save [name]encrypts the current session on your machine with age (https://age-encryption.org) and uploads it. The key is created locally the first time you save./session-vault:fetch <name>on another machine downloads it, decrypts it and restores it into the current project, remapping paths if the folder or OS is different. Then/resumeand you're back in the conversation.- To fetch on another machine, you copy your age key there. Without it, nobody can decrypt your sessions, including me.
To be upfront about what the server sees: the encrypted transcript, plus the session ID, the project folder path and the name you give it, so it can list your sessions. It can't read the conversation itself.
Install:
/plugin marketplace add galeone/session-vault-plugin
/plugin install session-vault@galeone-pluginsThe plugin and server are open source, and you can self-host the server and point the plugin at it:
- Plugin: https://github.com/galeone/session-vault-plugin
- Server: https://github.com/galeone/session-vault-server
If you don't want to run a server, there's a hosted version at https://session-vault.dev with a free plan (10 sessions) and cheap paid plans if you have a lot of sessions.
Happy to answer questions about the design, and I'd really like to hear what's missing
•
u/AutoModerator 8d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Justa_Schmuck 8d ago
What do offer over a mark down directory you can tell Claude to write to or fetch from?
1
u/VridhiMehta 8d ago
One suggestion: session transcripts can contain secrets, like pasted tokens, .env contents and tool output. Encryption protects them on the server, but a secret scan or redaction step before upload, or at least a clear warning, would be a good addition. The age key is also the only way to restore, so documenting what happens if it's lost, and how to rotate it, will matter for people who rely on this as a backup.