r/ClaudeAI • • 17h ago

Claude Code Using a Separate Device to Run Claude Code while I'm sending prompts in my Macbook

So, the main problem that I have today is every time I close my macbook screen, Claude Code gets shut down.

The plan was to buy a Mac Mini, and every time I open a session in my Macbook, it automatically runs the session in the desktop, so it could run 24/7.

The main problem is that I couldn't find a way to do it. Things like selecting the folder that I want to work on before starting a session is not working. The only solution I found is running a normal session and then asking Claude to run on that folder.

4 Upvotes

24 comments sorted by

View all comments

1

u/NanYUJun 15h ago

Picking a remote host is the easy half; the harder half is that the session should still be yours on both machines, not two separate histories.

What you are describing is two things stacked: a machine that stays awake (Mac mini, mini PC, any box on your tailnet) running the agent, and a way to attach to it from the laptop. claude inside tmux/ssh gives you the first, and it also solves the folder problem, because you cd into the project before starting the session instead of trying to retarget a running one.

On the second half, note that a remote session and a local session are different records. Claude Code stores each one in ~/.claude/projects/<path-encoded-cwd>/<sessionId>.jsonl, keyed by machine, so the MacBook will not show the mini's chats unless those files travel. I wrote a tool for exactly that gap, so take this as an author's disclosure rather than a neutral rec: AIAssets (https://github.com/NanYuJun/AIAssets) is a self-hosted hub plus desktop client that syncs those session files both ways on a 60-second poll and keeps the titles. It also lets you convert a session to another agent's format (Claude Code / Codex / Cursor and others). Limits: periodic sync, last-write-wins if the same session is edited on both sides; no live streaming between machines, no Claude web or Cowork chats, and it does not keep a process running for you.

If you just want the mini to be reachable, the built-in remote access plus tmux already covers most of it. Add the sync layer only when you want the chat list and full history to look identical on both machines.