claude-sessions-sync
Skill243 starsChanged 3 months agoMITView on GitHub
Sync Claude Code session records between two Anthropic accounts in the Claude desktop app on macOS. Use when switching accounts (for example when one hits usage limits) and old sessions disappear from the picker, or to mirror records before/after a switch.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- serejaris/personal-corp-osword for word, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 1
- serejaris/personal-corp-os★ 243100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- art-directorSkill
- audit-agent-rulesSkill
- avatarSkill
- benchmarkSkill
- cc-analyticsSkill
- ceo-councilSkill
- claude-md-writerSkill
- corp-doctorSkill
- corp-newSkill
- dailySkill
- fable-ruki-agentySkill
- gh-issuesSkill
- grill-meSkill
- harnessSkill
- html-draftSkill
- ideaSkill
- it-ram-doctorSkill
- make-3dSkill
- make-landingSkill
- managerSkill
- meeting-copilotSkill
- readme-generatorSkill
- retroSkill
- safe-public-releaseSkill
- sdlc-milestonesSkill
- tg-bot-opsSkill
- to-issuesSkill
- to-prdSkill
- weekly-planningSkill
- weekly-retroSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Run a bidirectional newest-wins sync of local_*.json — the script below.
- Very specific: line 22
Do NOT sync scheduled-tasks.json or backlog/ — each account+org pair keeps its own.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude sessions sync (between desktop-app accounts)
How it works (verified 2026-10-01…07, Claude Code 2.1.286, macOS):
- Session records live in
~/Library/Application Support/Claude/claude-code-sessions/<accountUuid>/<orgUuid>/local_*.json. The second path level is the organization UUID; the app lists only the current account+org pair, which is why switching accounts hides the other side's sessions. - Transcripts live in
~/.claude/projects/and are shared across all accounts — never touch them. A record points at its transcript through thecliSessionIdfield. - Active account:
~/Library/Application Support/Claude/config.json→lastKnownAccountUuid. The active org folder is the one holding the freshest record (mtime). - Account switches may leave empty race folders
<old-account>/<new-org>— ignore them.
Procedure
- The app must be fully closed:
pgrep -f "/Applications/Claude.app/Contents/MacOS"is empty; otherwiseosascript -e 'quit app "Claude"'and wait. Copying while the app is alive can be rolled back by its in-memory list cache (LSS-cached-sessions) and record rewrites. - Identify both working folders: under each account UUID take the subfolder with the most
local_*.jsonrecords (or the freshest one). - Run a bidirectional newest-wins sync of
local_*.json— the script below. A one-way copy leaves drift: sessions you continued on one side go stale on the other. - Merge
archived-sessions.idx: union thearchivedlists of both folders, write the same file into both. - Copy missing
deleted_*markers in both directions, otherwise deleted sessions resurrect in the picker. - Do NOT sync
scheduled-tasks.jsonorbacklog/— each account+org pair keeps its own. - Reopen the app, switch the login to the target account, verify the record count in the picker.
Script (edit FIRST/SECOND, app closed)
import os, json, shutil
SESS = os.path.expanduser("~/Library/Application Support/Claude/claude-code-sessions")
FIRST = f"{SESS}/<account-uuid-1>/<org-uuid-1>"
SECOND = f"{SESS}/<account-uuid-2>/<org-uuid-2>"
def records(d):
return {f: os.path.getmtime(os.path.join(d, f))
for f in os.listdir(d) if f.startswith("local_") and f.endswith(".json")}
f_rec, s_rec = records(FIRST), records(SECOND)
for f, m in s_rec.items():
if f not in f_rec or m > f_rec[f]:
shutil.copy2(os.path.join(SECOND, f), os.path.join(FIRST, f))
for f, m in f_rec.items():
if f not in s_rec or m > s_rec[f]:
shutil.copy2(os.path.join(FIRST, f), os.path.join(SECOND, f))
arch = set()
for d in (FIRST, SECOND):
p = os.path.join(d, "archived-sessions.idx")
if os.path.exists(p):
try: arch |= set(json.load(open(p)).get("archived", []))
except Exception: pass
idx = {"v": 1, "archived": sorted(arch)}
for d in (FIRST, SECOND):
json.dump(idx, open(os.path.join(d, "archived-sessions.idx"), "w"))
for a, b in ((FIRST, SECOND), (SECOND, FIRST)):
for f in os.listdir(a):
if f.startswith("deleted_") and not os.path.exists(os.path.join(b, f)):
shutil.copy2(os.path.join(a, f), os.path.join(b, f))Gotchas
- Claude Code cleans old transcripts (about a month back by default): such records return to the picker but open empty. There is nothing to restore from.
- Copies drift apart while you work on one account — rerun the sync on every switch.
- Continuing a moved session sends its transcript to the current account (privacy note for personal-vs-work orgs).
- There is no official cross-account migration (anthropics/claude-code#48511 closed as not planned); terminal
claude --resume <id>sees all local sessions under any login.
Background write-up: https://sereja.tech/blog/claude-code-sessions-between-accounts/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

