Skip to content

Sessions and why they survive

A session is one long-running program on a host, shown to you as a card. It can be an agent CLI, a plain shell, a browser target or a mirrored Simulator.

The important part is where it lives. A session belongs to the host, not to the app you are looking at it with. Offsite starts it inside tmux on the host machine and then streams that terminal to every device you have connected.

Host tmux session claude · codex · grok · shell working dir = your workspace Mac app iPhone app Watch attach and detach freely — the session never notices
Clients attach to a session; they do not host it. Quitting every client changes nothing about the process on the host.
  • Closing the app, on any device
  • Losing Wi-Fi, switching networks, going through a tunnel
  • Putting your client to sleep
  • Putting the host to sleep (it continues on wake — see Keep the host awake if you would rather it did not sleep)
  • Updating the host components
  • Ending it yourself (End Session)
  • The program exiting on its own
  • The host machine powering off — and even then, see below

Offsite recreates the tmux session and then resumes the conversation using each CLI’s own mechanism: claude --resume, codex resume, wired in per tool. You come back to the agent’s history, not to a fresh prompt.

To make that reliable, Offsite keeps its own archive copy of the resume artefacts, so a transcript cleanup on the CLI’s side cannot orphan your session.

The card and the sidebar show what a session is doing:

State Meaning
Working a turn is running
Needs input the agent is waiting for you
Needs attention something wants a decision — a permission prompt, a question
Ready idle at the prompt

These drive notifications too.

  • Each Offsite session runs on its own tmux socket (tmux -L offsite-<tool>-<session-id>) with Offsite’s own config file. Offsite never writes ~/.tmux.conf, never requires tmux plugins, and never changes your global tmux setup — a hard rule, not a default.
  • Session records live in ~/.offsite/sessions/ and ~/.offsite/state.db; resume artefacts are archived to ~/.offsite/session-archives.
  • Sessions receive OFFSITE_SESSION_ID, OFFSITE_WORKSPACE_ID, OFFSITE_TOOL and OFFSITE_SESSION_KIND in their environment.
  • Agent CLIs run in their fullscreen (alternate-screen) mode, which is why the card has no scrollback to search — the CLI owns the viewport and manages its own history.
  • Scrollback limit for shell sessions is set on Offsite’s own tmux config, not on yours.