Sessions
Leave the desktop where it is and return to the same buffers, windows and running tools. Every frontend attaches to an editor session in a separate process, whether the project is local or reached over SSH.
Return to your work
hide --resumeWith one unfinished session, the editor opens it directly. With several, it lists their hosts and working directories and asks you to choose a number in the launching terminal. If there is no interactive terminal, select the session explicitly:
hide --resume IDUse the ID printed when detaching, or any prefix that identifies it uniquely. The native window and browser title also show a distinguishing prefix of the session ID in brackets. The saved record supplies the project and, for SSH sessions, the host. Do not add a path or --ssh to --resume.
Shared sidebar
Expand Sessions to see editor sessions with their project, host, state and an unambiguous ID prefix. Sessions in the same directory keep distinct targets. Discovery and local probes run in the background; expanding a row never claims another display or starts SSH. Startup arguments and provider keys are absent from the tree.
Expand the current session to see its live editor windows. Selecting a window uses its captured ID and the ordinary window-selection owner. Removed windows, retired actions and modal controls refuse the selection; background refresh keeps the current focus.
Right-click another session and choose Switch to session to open its running desktop, or Recover to restore its saved desktop. The current session stays running, and the same native window, terminal display or browser page shows the new one. A busy or unavailable target leaves you in the current session. These controls apply to sessions on the same host; while editing over SSH, that means the remote host. Use hide --resume ID to choose a different host or frontend.
Choose Recover buffers here on a stopped session in the same project to bring its text, hex and ended terminal windows into the current desktop. Split views keep their shared buffer and undo history. A file already open here arrives as a separate copy; Save asks for a new path. The saved session remains available. Conversations, running tools and preferences stay with their own session.
Right-click a stopped local session marked recoverable and choose Delete... to remove its saved windows, unsaved edits and conversation checkpoints. The confirmation offers Delete and Cancel. Files saved in the project are untouched. Current, running and remote sessions cannot be deleted here; if a session starts running while the confirmation is open, deletion is refused.
The sidebar retains at most 1024 sessions/windows and pages 128 rows at a time. A discovery attempt has a ten-second limit and retains its last successful inventory on timeout or error. Remote catalog entries can remain visible offline.
Change displays
Choose the frontend as usual when returning:
hide --terminal --resume
hide --window --resume
hide --web --resume--metal and --vulkan also work. The native and browser displays are included unless disabled at build time. Only one frontend controls a session at a time, so detach the current one before opening another. Resuming keeps the existing desktop; the new frontend supplies its display and dimensions.
Detach or finish
Ctrl+] detaches in the terminal, native window and browser frontends. The native window closes; the browser confirms detachment and stops reconnecting. The launching terminal prints the session ID and a command to resume it. Buffers, including unsaved changes, remain in the session process.
Ctrl+C in the launching terminal stops the display and its editor daemon, after checkpointing unsaved buffers. The printed resume command restores that checkpoint; running terminal jobs, agents and debugger connections stop with the daemon. Inside an embedded terminal, Ctrl+C instead goes to that terminal's foreground program. Use Ctrl+] when you want those programs to keep running.
On POSIX systems, SIGTERM or SIGHUP sent to the frontend still detaches and prints the resume command while the editor session continues. In browser mode, closing a tab leaves the local frontend process running; use Ctrl+] in the page to release the session for another frontend. Reloading the page reconnects through the running frontend.
File > Exit finishes the session through the normal save prompts. Closing a connected native window follows that same exit workflow. Closing a native window while disconnected detaches without queuing an Exit for later delivery.
Run without a display
hide --daemon .
hide --sessions
hide --window --resume ID--daemon starts the desktop, waits until it is ready, prints its ID and returns. Agents, HLS, builds and debugger polling continue while detached. Human permission requests remain pending until you attach; being headless grants no permissions. Use --daemon --resume ID to continue an existing or recoverable session without opening a display. --sessions lists running, recoverable and remote sessions; live local entries also show attachment, replies, queued work and waiting state.
Recover after a process dies
The editor checkpoints its desktop once per second after changes. --resume reattaches to a live daemon or restores its last complete checkpoint after a crash. Recovery includes unsaved text and hex buffers, saved disk baselines, undo/redo history, split views, window placement, Files, display preferences and each retained conversation draft, including its editing history. Source files are never overwritten during recovery. If a file changed on disk, the usual conflict checks still apply when saving. Unsent input from other plugin windows opens as private Recovered input.txt source windows, with its selection and Undo/Redo. Save or Discard it normally. Withdrawing a plugin during a session preserves its input the same way.
Conversation transcripts and their provider resume IDs are retained per editor session. Resume the provider explicitly to reconnect. Terminal output is restored as an ended view; live terminal processes and debugger connections are not recreated. Pending questions and approvals are not restored or accepted.
Checkpoints and the session catalog live under the private $XDG_DATA_HOME/thc-edit/sessions directory (normally ~/.local/share/thc-edit/sessions on Unix; the platform application-data directory on Windows). Atomic replacement keeps a partial write from replacing the previous checkpoint. Up to a second of recent work can be lost on abrupt termination; this is process-crash recovery, not a guarantee against power loss. A checkpoint over 256 MiB reports an error and retains the previous complete version rather than trimming your history. Save important files normally. Checkpoint format 6 records explicit document privacy. Earlier checkpoint formats are rejected without overwriting them; save files before upgrading from a build that writes an older format.
File > Exit removes the completed session's checkpoint. A crash or lost frontend leaves it available. Session ownership uses an OS-held lock so concurrent resume attempts cannot start independent daemons for the same desktop.
These editor sessions are separate from a provider's conversation sessions. Tools > New conversation and Tools > Resume session manage the latter; see conversations. Remote editing covers connecting to another machine for the first time.
Proposed live sharing
The live-sharing design describes simultaneous displays and invited collaborators with independent views and per-person permissions. It is a proposal; the single controlling frontend behavior described above remains the current session contract.