Session Sharing
Share your Claude Code conversation history with teammates, collaborators, or across machines.Overview
The session sharing system allows you to:- Export conversations as portable JSON files
- Upload sessions to cloud storage (x0.at)
- Clone shared sessions to continue conversations
- Download session context as markdown files
src/session-sharing.js, this feature enables seamless collaboration.
Exporting Sessions
Export as Markdown
Download a conversation as a markdown file optimized for Claude Code:Markdown exports are perfect for providing context to new Claude Code sessions or sharing read-only conversation history.
Export as JSON
Export the full session data for cloning:Sharing Sessions
Upload to x0.at
Share sessions via the x0.at file hosting service:1
Export Session Data
Convert conversation to portable JSON format
2
Upload to x0.at
3
Share URL
Send the returned URL to collaborators:
Generate Share QR Code
Create QR codes for mobile sharing:Cloning Sessions
Clone from URL
Download and import a shared session:Clone Implementation
The cloning process (cloneSession method):
- Download - Fetch JSON from URL using curl
- Validate - Check session structure and required fields
- Install - Place in
~/.claude/projects/{project}/directory - Settings - Create
settings.jsonwith metadata - Ready - Session appears in Claude Code session list
Session Installation
Cloned sessions are installed to the standard Claude Code directory:Cloned sessions integrate seamlessly with Claude Code. Use
claude --resume {id} or select them from the sessions list in the UI.Message Limits
Large conversations are truncated to avoid excessive file sizes:JSONL Format
Sessions use JSONL (JSON Lines) format - one JSON object per line:- Streaming - Append messages without parsing entire file
- Partial reads - Read specific lines without loading all messages
- Efficient parsing - Process one message at a time
Security & Privacy
Sanitizing Sessions
Before export, review messages for:Private Sharing
For sensitive projects, use private file sharing:- Export locally - Save JSON to disk
- Encrypt - Use GPG or similar encryption
- Share privately - Use secure channels (Slack, email, private cloud)
- Decrypt - Recipient decrypts before cloning
Use Cases
Team Collaboration
Share context when handing off work:Cross-Machine Sync
Continue work on different machines:Code Review Context
Provide full context for code reviews:Onboarding
Share project setup sessions with new team members:API Reference
SessionSharing Class
Export Options
Clone Options
Troubleshooting
Clone Fails with βInvalid session fileβ
- Corrupted download
- Not a valid Claude Code session export
- Outdated export format
- Re-download the file
- Verify URL is correct
- Check export was created with recent version
Upload to x0.at Fails
- Check internet connection
- Verify x0.at service is available
- Try again in a few minutes
Session Not Appearing in Claude Code
Next Steps
Sandbox Execution
Run Claude Code in isolated environments
Remote Access
Access analytics dashboards remotely