# Hermes session management API (for client apps) - REST routes live in `~/.hermes/hermes-agent/hermes_cli/web_routers/sessions.py` (`manage_router`), not in `web_server.py`. Grep there for delete/patch/post/put. - `PATCH /api/sessions/{id}`: body title / pinned / archived. An empty title clears the title. - `DELETE /api/sessions/{id}`: returns `{ok:true, already_absent:true}` if the session is already absent (treat as success); returns 409 while the session is being written; also deletes the compression chain. - Clients may call these over REST (WingWire: `HistoryApi`). Plans sometimes name RPCs like `session.title/set_hidden/delete`; keep the existing REST path in the client rather than adding a second mechanism. - Catch-up on reconnect: `session.events.since` RPC in `tui_gateway/methods_session.py` (lastSeq/epoch/truncated). - Never send `session.close` from a client: it closes the session for every attached client (desktop/TUI). The gateway itself detaches dropped transports and reaps orphaned sessions. - For E2E against a real dashboard, workers may modify/delete only sessions they created themselves.