{"slug": "keeping-ai-coding-agent-sessions-in-sync-across-machines", "title": "Keeping AI coding agent sessions in sync across machines", "summary": "A developer built AIAssets, a self-hosted hub that scans and indexes the local session files of coding agents like Claude Code, Codex CLI, Cursor and Gemini CLI, then syncs that index and session data bidirectionally across machines on a 60-second poll. The tool preserves session titles and adds search, share and backup, with self-hosting chosen so transcripts containing source code and credentials stay off third-party services. The developer flags unresolved limits including project path mapping across operating systems, divergent session branches, and wasteful full-hub polling over metered connections.", "body_md": "I work across more than one machine, and I switch between coding agents depending on the task: Claude Code, Codex CLI, Cursor, Gemini CLI. The models keep getting better, but the context is still nailed to one laptop.\n\nEvery agent stores its history differently, and locally:\n\n`~/.claude/projects/<encoded-project-path>/<session-id>.jsonl`\nCopying the project folder is not enough, because session files live outside it. Copy them to a new machine and the paths may not match either. So \"continue where I left off\" turns into manual file archaeology.\n\nI built AIAssets to fix that for my own workflow.\n\nAIAssets is a self-hosted hub. On each machine it scans the session files of the agents it supports, indexes them, and syncs the index and session data bidirectionally through the hub on a 60-second poll. Session titles are preserved, so you can find the thread you were in. Over that index it also gives you search, share, and backup.\n\nSelf-hosting is a deliberate choice: transcripts contain source code, internal URLs, and sometimes commands with credentials in them. I did not want a third-party service holding all of that.\n\nThe README lists 10 agents with read/write support, including Claude Code, Codex, Cursor, and Gemini CLI. It is early software, so the limits matter more than the feature list:\n\n`pnpm run build:mac`; it is not signed, so Gatekeeper will complain.\n**1. Project path mapping.** A session is tied to a working directory. If machine A uses `/Users/me/code/foo` and machine B uses `D:\\code\\foo`, restoring on B can show the session but fail to resume because the cwd does not exist. Should the hub rewrite paths, or store a logical project ID? I lean toward the latter, but it is not shipped.\n\n**2. Divergent branches.** The same session continued on two machines creates two files. Last-write-wins loses one side. A real merge of JSONL transcripts is harder than it sounds, and I would rather not fake it.\n\n**3. Size and transport.** Sessions can get large. Polling the full hub every 60 seconds is fine on a LAN and wasteful over a metered connection. Incremental transfer is on the list.\n\n[https://github.com/NanYuJun/AIAssets](https://github.com/NanYuJun/AIAssets)\n\nIf you run more than one machine or more than one agent, I would rather hear which part breaks first than get a star. Issues with your setup — OS, agents, where the sessions live — are more useful than \"doesn't work\".", "url": "https://wpnews.pro/news/keeping-ai-coding-agent-sessions-in-sync-across-machines", "canonical_source": "https://dev.to/nanyujun/keeping-ai-coding-agent-sessions-in-sync-across-machines-5h7", "published_at": "2026-11-02 04:09:24+00:00", "updated_at": "2026-11-02 04:21:55.583641+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-infrastructure"], "entities": ["AIAssets", "Claude Code", "Codex CLI", "Cursor", "Gemini CLI", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/keeping-ai-coding-agent-sessions-in-sync-across-machines", "markdown": "https://wpnews.pro/news/keeping-ai-coding-agent-sessions-in-sync-across-machines.md", "text": "https://wpnews.pro/news/keeping-ai-coding-agent-sessions-in-sync-across-machines.txt", "jsonld": "https://wpnews.pro/news/keeping-ai-coding-agent-sessions-in-sync-across-machines.jsonld"}}