[FEATURE] Cross-Environment Conversation History Synchronization for Claude Code CLI
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When working across multiple development environments, conversation history becomes fragmented and inaccessible across systems. Each environment stores history independently in its local ~/.claude/ directory.
As a developer, I regularly work across multiple environments:
- Primary: WSL2 on Windows (main development)
- Secondary: SSH connections to remote servers (testing/deployment)
- Occasional: Other workstations
Each environment maintains its own separate conversation history:
- WSL2 environment → /home/user/.claude/
- SSH remote server → /home/user/.claude/
- Another machine → /home/user/.claude/
This fragmentation causes:
- Lost context: Cannot reference conversations from other environments
- Duplicated effort: Have to re-explain context when switching environments
- Difficulty tracking: Hard to find "that conversation" when it could be on any machine
- No continuity:
/resumeonly works within the same environment
Related closed issues:
- #7805 (Closed as duplicate): Cloud-based history - duplicate target unknown, focused on claude.ai integration
- #10793 (Closed): Cross-product sync (Desktop/Web/Code), not CLI-to-CLI
Related open issues (different focus):
- #9306: Project-local storage (portability via local storage, not cloud sync)
- #394: View history from all sessions (local viewing, not cross-environment access)
This request specifically addresses synchronization between multiple Claude Code CLI environments (WSL, SSH remotes, multiple machines) — a use case not covered by existing open issues.
Proposed Solution
Implement optional cloud synchronization for conversation history, similar to how VS Code Settings Sync works.
Option A: Cloud Sync (Preferred)
- Sync ~/.claude/ to Anthropic's cloud (tied to account)
- Encrypted, opt-in feature
- Automatic conflict resolution (merge or last-write-wins)
Option B: Configurable Remote Storage
- Allow users to specify a sync target (S3, GCS, NFS, etc.)
- Configuration via ~/.claude/settings.json:
{
"history.syncTarget": "s3://my-bucket/claude-history/",
"history.syncEnabled": true
}
Option C: Export/Import Commands
- /history export → Creates portable archive
- /history import <path> → Merges history from archive
- Manual but simple approach
Alternative Solutions
Current workarounds (all have significant drawbacks):
- Manual rsync of ~/.claude/ between machines (tedious, error-prone)
- Symlinks to shared network storage (latency issues, lock conflicts)
- Simply not referencing past conversations (defeats the purpose of history)
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
- Start a conversation on WSL2 about a project implementation
- SSH into a remote server to test deployment or debug an issue
- Want to continue the same conversation or reference it — currently impossible without manual file copying
- Return to WSL2 and forget what was discussed on the remote server
With cross-environment sync, all conversations would be accessible from any authenticated Claude Code instance.
Additional Context
This feature would significantly improve the experience for:
- Developers using WSL + native Windows
- DevOps engineers working on multiple servers
- Remote workers switching between office and home machines
- Anyone with a multi-machine workflow
I'm happy to provide more details or test beta implementations.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗