dtach sessions with overlay isolation
# create a session โ you're in, working $ sess new feature-auth Session 'feature-auth' created. Attaching... feature-auth | none | main | ~/project 14:30 # ...work in session... Ctrl+\ to detach # reattach later $ sess feature-auth # close laptop. open laptop. all sessions still alive on the VM. $ sess up Reconnecting to 1 session(s)... # create an isolated overlay (only deltas stored) $ sess overlay new feature-auth bugfix-1222 main Overlay 'bugfix-1222' created and mounted. # writing to the overlay does NOT touch the original repo $ sess diff feature-auth +overlay change # open Cursor on laptop, connected to VM session $ sess code feature-auth
Single Unix socket per session. No server process. Ctrl+\ to detach, sess <name> to reattach. Survives SSH drops.
N independent writable views of the same repo. Only deltas stored. Writing to one overlay never touches another or the base.
Sessions live on the VM. Your laptop is just a terminal. sess ssh connects, sess up reconnects all on wake.
Tracks how each session ended: detach (Ctrl+\), exit (typed exit), or drop (SSH timeout/laptop sleep).
sess code <name> opens Cursor/VS Code via Remote-SSH. No manual config needed.
PROMPT_COMMAND renders session | overlay | branch | path. Plain text, no colors, no multiplexer needed.
# one-time: point sess at your VM $ sess remote add default user@dev-vm # daily workflow $ sess new feature-auth # SSH to VM, create, attach $ sess feature-auth # reattach $ sess code feature-auth # open Cursor on laptop $ sess ssh # plain SSH to VM # close laptop. open laptop. $ sess up # reconnects everything # how did my last session end? $ sess connections feature-auth 2026-07-09T14:30:00 detach (Ctrl+\) 2026-07-09T15:12:00 drop (exit code 141) 2026-07-09T16:45:00 exit
| Feature | macOS | Linux |
|---|---|---|
| dtach sessions | โ | โ |
| Status bar | โ | โ |
| Connection log | โ | โ |
| Remote (SSH to VM) | โ | โ |
| Auto-reconnect on wake | โ SleepWatcher | โ systemd |
| sess code | โ Cursor/VS Code | โ |
| Overlay isolation | โ APFS clone | โ OverlayFS |
| sess | git worktree | tmux | Docker | |
|---|---|---|---|---|
| Isolation | per-overlay | branch-level | shared FS | full |
| Creation | ~instant | ~1s | N/A | ~seconds |
| Disk/session | delta only | full copy | 0 | full copy |
| SSH persist | โ dtach | โ | โ | manual |
| Extra process | none | none | server | daemon |
| Path stability | same path | varies | โ | mapping |
~/.sess/sessions/feature-auth/ โโโ socket โ dtach Unix socket โโโ hook.sh โ PROMPT_COMMAND status bar โโโ state โ session metadata โโโ log โ activity log โโโ connections โ detach/exit/drop log โโโ overlays/ โโโ bugfix-1222/ โโโ upper/ โ writable layer (deltas only) โโโ work/ โ kernel work dir โโโ merged/ โ unified mount point