feat(syncthing): sync claude chat history#119
Merged
Conversation
- add shared folder for ~/.claude/projects between laptop and wsl - lets a chat started on one host resume on the other via --resume - syncs only projects/ (session transcripts), leaving out credentials, caches and nix-managed config to avoid conflicts Co-Authored-By: Claude <noreply@anthropic.com>
- set folder type per host: wsl sendonly, laptop receiveonly - laptop claude activity no longer propagates back to wsl - wsl stays the single source of truth for chat history Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que muda
Adiciona uma pasta compartilhada
claudeao Syncthing (modules/services/syncthing.nix), apontando para~/.claude/projects, entre os hostslaptopewsl.O sync é unidirecional: o WSL é a fonte da verdade (
sendonly) e o laptop apenas recebe (receiveonly).Por quê
Permite continuar no laptop uma conversa do Claude Code iniciada no WSL, via
claude --resume. Os transcripts de sessão (.jsonl) vivem em~/.claude/projects/, e o resume casa a sessão pelo path do diretório de trabalho, que é idêntico nos dois hosts (/home/aly/...).Escopo
projects/(os logs de sessão retomáveis)..credentials.json), caches e arquivos gerenciados pelo Nix (settings.json,CLAUDE.md) para evitar conflitos e vazamento de segredos.sendonly, laptopreceiveonly(detecção viaconfig.networking.hostName).maxConflicts = 0, sobre Tailscale.Cuidado no uso
Atividade do Claude no laptop não volta para o WSL. Edições/exclusões locais no laptop são marcadas como out-of-sync e podem ser revertidas para bater com o WSL, mas nunca se propagam de volta. O WSL segue como única fonte de verdade do histórico.
Validação
nix fmtnix flake check --no-build(passa em todos os hosts, incl.laptopewsl)