Home/Q&A/Does a long Claude Code task stop when my remote connection drops?

Does a long Claude Code task stop when my remote connection drops?

Updated · airankrush

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.

Information as of .

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

  1. Install tmux with Homebrew and start a named session: tmux new -s work.
  2. Start Claude Code inside the session and write its output to a log file as well.
  3. Press Ctrl-b, then d, to detach from the session, then disconnect from remote desktop.
  4. When you come back, run tmux attach -t work to reattach. If the conversation is gone, claude --continue picks up the previous one.
  5. Before the task starts, set which actions it is allowed to take, so it waits for confirmation less often along the way.

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:

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All Q&A