Direct answer
Usually not. Disconnecting from remote desktop only ends the session on your side. The remote Mac keeps running and Claude Code carries on in the terminal. If it is sitting at a step that waits for your confirmation, though, it will not move forward by itself.
Basis
- Disconnecting is not the same as shutting down the remote Mac. Apps on the desktop and the terminal keep running according to their own settings, and the next time you connect you see the same windows.
- Claude Code runs as a process in the terminal. As long as the terminal window stays open and the user stays logged in, the process stays alive.
- What really interrupts a task: restarting the machine, logging out, closing the terminal window, the system going to sleep, and the task getting stuck on a prompt that needs your approval.
- Terminal multiplexers such as tmux and screen let a session exist independently of the window, so you can reattach even if the window is closed by accident.
Boundaries: when the answer is different
The task has to reach the model over the network. If the network is unstable at that moment or the account's usage allowance runs out, it stops with an error, and that has nothing to do with whether your remote connection dropped. If the machine is restarted for maintenance, unsaved terminal sessions are lost too. One common misreading: the task never stopped, it has simply been sitting at a prompt waiting for approval, making no progress for hours, and what you come back to is a cursor waiting for nothing. We do not promise that tasks will not be interrupted; for important long tasks, keep your own checkpoints and logs. For the fuller approach, see the guide to keeping long tasks running.
How to do it
- Install tmux with Homebrew and start a named session:
tmux new -s work. - Start Claude Code inside the session and write its output to a log file as well.
- Press Ctrl-b, then d, to detach from the session, then disconnect from remote desktop.
- When you come back, run
tmux attach -t workto reattach. If the conversation is gone,claude --continuepicks up the previous one. - Before the task starts, set which actions it is allowed to take, so it waits for confirmation less often along the way.
Related questions
- Remote Mac mini for heavy Claude Code use: an always-on workstation, not account insurance
- How to keep long tasks running on a remote Mac mini after you disconnect
- My agent stops when I close my laptop lid. What can I do?
- Can I shut down a rented Mac mini or put it to sleep?
- How do I know my unattended agent is still running properly?
Use case
This question belongs to the use case: Remote Mac mini for heavy Claude Code use: an always-on workstation, not account insurance
Other questions in the same use case:
- Is the network exit on my rented Mac mini used only by me?
- Can I rent just the Mac mini and use my own Claude account?
- Should I rent or buy a Mac mini to run Claude Code?
- Coding on a remote Mac mini: remote desktop or terminal?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support