Using Modem

Interactive sessions

Attach, detach and come back to the same screen.

Opening one

$ modem claude        # or codex
$ modem shell         # a plain shell

If a session already exists for this folder, the same command reattaches to it. There is no separate "resume" to remember.

Detaching

Press Ctrl+Q. The connection closes; the session, its screen and its running process stay on the computer. You can shut the laptop.

Come back with the command you used to open it, from the same machine or another one you have set up. The screen is redrawn exactly as you left it, mid-sentence if that is where you were.

What happens while you are gone

  • The agent is working: the computer stays awake until it stops, then suspends.
  • The agent is idle: the computer suspends within minutes, freezing the screen. Waking restores it.
  • An agent waiting on a timer is frozen too: a countdown inside an agent does not survive suspension. For anything time-based, use a job.

Network hiccups

If the link drops, Wi-Fi, sleep, a train tunnel: the CLI reconnects on its own and redraws the screen. You see a short notice, never a lost session. Only Ctrl+Q ends the connection deliberately.

Several sessions

$ modem ls

Lists every session and job on the computer. Sessions are named after the folder they were launched from, so two projects on the same computer keep separate screens.

One interactive agent at a time per project is the sane default. For work in parallel, run one as a job or use a second computer.

Terminal behaviour

The remote session uses the full terminal: colours, mouse, resizing. Scrolling with the trackpad works in the shell; inside Claude Code, history is browsed with PgUp / PgDn, exactly as it does locally. Selecting text with the mouse requires holding , the usual trade-off when the remote side handles the mouse.