# Resuming work after a gateway crash or killed session Use when the user says work "stopped", "crashed", "where were you, continue" and the current session has no memory of the task. Goal: find the exact stopping point from the real DB, recover what is on disk, re-dispatch only what was lost. ## 1. Find the interrupted session - `session_search` with no args lists recent sessions; the interrupted one is usually the long Telegram session with the latest `last_active`. - Read only its tail through your session/history tool (scroll from the end) instead of loading hundreds of messages; convert timestamps to the user's time zone (``). Do not open the agent's database files directly. - Then list every message after the last user request (including tool calls) to see which step was running when it died. ## 2. Check background delegations Use your runtime's own delegation/process status tool to see each background child's state. A child with no terminal result after a gateway crash most likely died with the gateway. Compare what it was supposed to produce with the artifacts on disk (report files), not with internal databases or other profiles' cache directories. Missing artifacts = redo; partial artifacts = continuation brief (see SKILL.md rule 27). ## 3. Confirm why it died before restarting `grep` the gateway/agent logs around the last timestamp. `lifecycle_ledger: ... exited UNCLEANLY` with `suspected_oom=False` is a SIGKILL of the gateway; note the main session's last `in=` token count (a 250K+ context is a likely contributor). Do not run `hermes gateway start` to "fix" it; check `status` only. ## 4. Re-dispatch losslessly - Recover the exact original task briefs from the dead call (visible in the session's history through your session tool) instead of retyping them; going forward, write every brief to a file before dispatching so a crash never loses it. - Write each brief to a file next to the shared context (`GOREV-A.md` ...) and give each child a short context: read shared context file, read its task file, read the coordinator's raw notes, then work. - Add to every brief: append findings to the report file incrementally (not at the end), cap single command output (~20 KB), no `kill`/`pkill`, only the report file is writable. A crash then loses minutes, not the whole run. - Start from a fresh session so the coordinator context is small again. ## 5. Report to the user Where it stopped (task + last completed step), what survived on disk, what was lost and why (with the log evidence), what was re-dispatched (delegation id), and that nothing will be changed before approval if the task was approval-gated.