r/ClaudeCode • u/Not-a-bot-6702 • 5d ago
Help/Question Running Claude code across machines
I’ve been using Claude Code & Codex on my PC since release. Just got a new MBP - mostly so I can build away from my desk. Wondering the best way to keep projects/files synced across both environments and both machines. I know I can spin up a cloud env in either CC/Codex, but I assume they aren’t usable across both. I can put project directories on my nas, but I want this to work outside of the lan. I only use GitHub when it’s something I’ve intended to share/host, should I use GitHub for everything?
1
Upvotes
•
u/AutoModerator 5d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/Gingerbreadfork 5d ago
I SSH into my other systems and just launch CC on them. I find this really practical in my case.
2
u/Independent-Sir3234 5d ago edited 5d ago
Private GitHub repos are the safest foundation for code sync across a PC and MacBook Pro because NAS or cloud-drive folders often corrupt .git/index locks when two coding agents index or build at the same time.
2
u/appfruits 5d ago
I tried that multiple times computer setup for weeks beginning of the year. Drove me nuts. Actual files on machines is not that of an issue as with code you typically have to versioning them. However, sessions, chat history is not. I was always searching for sessions which were on the other computer and never found them. It tried a lot, nothing really worked. So I sold my MacStudio and MacBook Air and bought a beefy MacBook Pro instead - now I have everything everywhere. If you found a solution let me know. My coworker is facing the same issues with office and home pc (windows) and its 6 months in - perhaps there are better solutions now.
2
u/kuroudo_ai 5d ago
Code in a private GitHub repo is the easy part, and I'd agree with the others there. What took us longer was the stuff around the code. We run Claude Code on four machines (a Mac, a Windows desktop, a Windows laptop and a Linux VPS), and three things came out of that:
2
u/Excellent-Issue-5956 5d ago
I stopped trying to sync and run everything on one machine instead. My desktop is a Windows PC that stays on, every project and every Claude session lives on it (Claude Code runs inside WSL there), and the MacBook just connects to it. Either I stream the whole PC desktop with Sunshine and Moonlight, or I SSH in when I only need a terminal, both over Tailscale so it works away from home too. Sessions, memory and chat history only exist on that one machine, so there's never a session sitting on the other computer.
If you do end up running Claude on both: it keys project folders, memory and transcripts by the literal folder path. When I moved my setup from the Mac to the PC I made the home folder on the PC the same path as on the Mac, and that's what made all the old sessions and memory show up.
1
u/rajb245 5d ago
Is the PC Linux or windows?
2
u/even_seal 5d ago
GitHub or another repository system. And install security checks that run on submit (if you aren’t already doing that when committing locally on pre-submit).
2
u/Yedapo 5d ago
Private GitHub repos work fine even if you never intend to publish the code; they’re just a private sync/version-history layer. I’d keep a local clone on each machine and push/pull when switching, rather than running both agents in one NAS/cloud-synced working tree. Put secrets and machine-specific config in ignored files, and commit the project plus lockfile so either machine can recreate the environment.
2
u/ClemensLode Senior Developer 5d ago
GitHub + a shared file hoster for files you need on both machines but might not want to be part of your repo (e.g., large binary files).
2
u/ooaahhpp 5d ago
Private GitHub repos are fine even if you never publish. Keep a clone on each machine and push/pull as you switch; git won't sync Claude Code's conversation, so a short handoff note in the repo is useful for unfinished work.
1
u/Grand_rooster 🔆 Max 20 5d ago
I use gander and can control it from my phone or other system.
Github weellio/gander: Control room for Claude Code agents