Expand description
The incident record: what went wrong and what AgentMux did about it, kept
for the user (docs/specs/SPEC_RECOVERY_NOTICES_AND_TOASTS_2026_10_16.md
§4.1). The host writes the cases it handles (agentmux-cef
commands::incidents), the launcher the ones only it sees (a restart);
the frontend shows each one the user hasn’t closed.
An append-only JSON-lines file in the instance’s data folder: an incident is one line, closing its notice appends an acknowledgement line. Written synchronously, since the writers are recovery paths that may be about to exit; incidents are rare, and each write is one small append.
Structs§
- Incident
- One incident, as the user is told about it.
Constants§
- FILE_
NAME - The file’s name in the data folder.
- RESTART_
ID_ ENV - The environment variable the launcher starts a respawned srv with: the id of the incident it records for the restart.
Functions§
- append
- Append
incidentto the file atpath. - append_
ack - Append the acknowledgement of incident
id. - append_
interrupted - Append what srv found at start-up:
agentsagent processes were running when the previous srv died (session_recovery::scan_orphans).restartis the id of thesrv_restartedincident whose respawn started this srv (the launcher passes it inRESTART_ID_ENV; a cold start has none and writes nothing). The two are written by different processes, in either order. - read
- The newest
maxincidents atpath, newest first, each with its acknowledgement. A missing file is no incidents.