Loading…

Docs

Claude in Powershell and tmux

Docs Guides
  1. Open PowerShell (or WSL) and SSH in the same way as always:
    ssh ahmad@100.111.255.36
  2. Once connected, resume this exact conversation:
    claude –continue
  3. That picks up the most recent conversation automatically — including all the context from this whole session. If for some reason it doesn’t grab the right one, claude –resume (no argument) shows a picker of recent sessions to choose from.

Worth mentioning for later, not right now: since this session isn’t in tmux, any future SSH hiccup (not just this lid test) would kill it the same way — running long Claude Code sessions inside tmux makes them survive disconnects entirely, so you could reconnect without even needing –continue. I won’t set that up mid-session since it’d mean restarting this one, but it’s worth doing next time you start a fresh session.

tmux

The concept: normally, when you SSH in and run a command, that command lives inside your SSH connection — close the connection, and the command dies with it. tmux creates a persistent “terminal session” that lives on the server itself, independent of any SSH connection. You can “detach” from it (leave it running, disconnect), then “reattach” later from anywhere — even a different device — and it’s exactly as you left it.

Starting a fresh session (do this instead of just typing claude directly next time):
tmux new -s claude
-s claude names it “claude” so it’s easy to find later. You’re now inside a normal-looking terminal — run claude here as usual.

Detaching (leave it running, safe to close your laptop/lose connection):
Press Ctrl+b, release, then press d. You’ll drop back to your regular shell, and the session keeps running in the background on the server.

Reattaching later (from any device, any time):
tmux attach -t claude
You’re back exactly where you left off — full scrollback, Claude Code mid-conversation, everything intact.

Other useful commands:
tmux ls # list all running sessions
tmux kill-session -t claude # end it permanently when you’re really done

That’s genuinely most of what you need day-to-day. The one habit to build: whenever you’re about to start something long-running (a Claude Code session, a big transfer), do it inside tmux new -s first, so a dropped connection never costs you the session.

Installing tmux

aThere wasn’t a separate “setup” step beyond what’s already true — tmux was already installed on the server (we added it earlier during the media transfer). The “setup” is really just the workflow itself. Here’s the clean version for your notes:

Check it’s installed (already is, on this server):
which tmux

Start a new named session (do this instead of running claude directly):
tmux new -s claude

Detach (leaves it running, safe to disconnect): press Ctrl+b, release, then d

Reattach later (from any device, any time):
tmux attach -t claude

List running sessions:
tmux ls

End a session permanently:
tmux kill-session -t claude

That’s the complete setup — no config file, no service, nothing else to install. The one habit worth documenting: start any long-running SSH work (a Claude Code session, a big file transfer) inside tmux new -s first, so a dropped connection never costs you the session.