How to move a Claude, Codex, or OpenCode session to another machine (without starting over)
Keep the same conversation going, switch which machine owns the session, and (optionally) move the workspace too.
- CLI
- 0.1.0
- Preview ref
- f36aa45
I kept running into the same moment at the end of the day:
- I started a session on my laptop.
- I want to close the laptop (or it’s about to die, sleep, lose Wi‑Fi, or go back in my bag).
- I don’t want the session to stop. I want it to keep going — but on a different machine.
That’s the actual promise of session handoff:
same session id, same thread… but a different owning machine.
Most tools don’t give you a clean “transfer the whole session to another machine” flow.
Happier does — it’s called Session handoff.
TL;DR
- Decide what you’re trying to do:
- Move the session to another machine (so you can shut the laptop)
- optionally: move the workspace too (if the destination doesn’t already have the files)
- Set up Happier on both computers (or at least have both connected to the same Happier server).
- Open the session → start Session handoff (session header menu or Session info).
- Pick the destination machine.
- Decide:
- Workspace transfer: off by default (safest)
- If it’s a Direct session: Keep direct vs Convert to synced
The problem
Sometimes the limiting factor isn’t “can I use my phone?”.
It’s “which machine owns this session right now?”.
If the session is owned by the wrong machine, everything becomes awkward:
- the tools you actually want to run are elsewhere
- you end up re-creating sessions just to move where the work runs
- you lose continuity (and you start re-explaining context)
Session handoff is the clean “same session, different machine” move.
What I tried first (and where I bounced off)
- Just let the laptop sleep and hope the session survives: sometimes fine, but it’s not something I like depending on.
- Start a new session on the other machine: works, but you lose the thread (and you re-explain context).
- Fork the session: useful when you want a branch, but it doesn’t solve “keep the same session alive elsewhere”.
- SSH into the laptop from my phone: works, but if the laptop is the thing I’m trying to shut down, this is backwards.
- Happier session handoff: does the one thing I actually wanted — keep the same session id and move the active owner.
If you’re new to Happier (what it is, and where to get it)
If you haven’t seen Happier before: it’s an open-source companion app (mobile/web/desktop) for AI coding agents like Claude Code, Codex, and OpenCode.
The workflow here is: use Happier from your phone to monitor and steer sessions, while the repo/workspace stays on the machine that owns it.
Get set up:
- How to run Happier from your phone
- GitHub: https://github.com/happier-dev/happier
- Install/download: https://github.com/happier-dev/happier#how-it-works
- Discord (community + support): https://discord.gg/W6Pb8KuHfg
A workflow that works (step-by-step)
1) Decide if you’re moving “just the session” or “the session + the workspace”
Session handoff has two knobs:
- Session ownership: which machine is the active owner for the session (this is the core feature).
- Workspace transfer: whether Happier copies the workspace files to the destination machine.
If your goal is “I need to shut down this laptop but keep the session alive”, you almost always start with ownership move.
Workspace transfer is optional: it’s for when the destination machine doesn’t already have the files you need, or you want the destination to become the new home for the repo for this session.
2) Start Session handoff from the session
You can start handoff from:
- the session header action menu
- the Session info screen
Pick the destination machine and confirm.
3) Choose whether to transfer the workspace (optional)
By default, workspace transfer is off.
Turn it on only if you really want Happier to copy your session workspace to the destination machine.
If you do enable transfer, you’ll also choose:
- what to do if the destination path already exists (sibling copy vs replace)
- how to handle ignored files
A detail I’m glad Happier is strict about: it blocks workspace transfer for unsafe source paths like:
/- your home directory
~
So you don’t accidentally try to copy half your machine.
4) If this is a Direct session, choose: Keep direct vs Convert to synced
Session handoff works for both Synced and Direct sessions.
For Direct sessions, the handoff UI adds a choice:
- Keep direct: the session stays provider-backed.
- Convert to synced: move out of the machine-bound direct model and let Happier own the session going forward.
A simple decision rule:
- If you still want “provider-backed, machine-attached” semantics: Keep direct.
- If you want the session to behave like a normal Happier session afterward: Convert to synced.
5) If handoff fails, check auth expectations (connected services vs machine-local auth)
Session handoff doesn’t magically log the provider CLI into the target machine.
Two concepts interact here:
- Connected services: credentials live in your Happier account, and compatible backends can reuse them across computers.
- Machine-local provider authentication: some backends still rely on the provider’s native CLI login state.
If the destination machine can’t satisfy the provider/runtime requirements, the handoff can’t complete.
Supported providers (what to expect)
This is provider-dependent.
According to the current docs:
- Claude: supported
- OpenCode: supported
- Codex: available but less stable than Claude/OpenCode
If a provider doesn’t support handoff for the current session, the action is hidden/unavailable.
Why this works (and what breaks)
Session handoff works because Happier treats “session id + transcript + session metadata” as one unit, and it changes which machine is the active owner.
It breaks when the destination machine can’t actually run what the session needs:
- machine offline
- backend not installed or not available there
- provider auth missing
Common mistakes
- Turning on workspace transfer by default → keep it off unless you truly need file copy.
- Expecting handoff to fix provider login → it doesn’t; prepare the target machine/auth.
- Using fork when you really wanted ownership move → fork is for branching; handoff is for “same session, different machine”.
FAQ
Does this keep the same session id?
Yes — that’s the whole point of handoff.
Is this the same as “Attach to session”?
No. Attach is for reopening a session from a terminal on the same machine. Handoff changes the owning machine.