Files
hermes-agent/cron
Austin Pickett 46370fd2a2 fix(desktop): gate cron-run writes on scheduler ownership, re-evaluated per send
The view-only decision for a never-closed cron run keyed on `is_active`,
a 300s activity window. A live run inside a long tool call writes no
heartbeat, reads inactive exactly like a zombie, and was latched
read-only for the rest of the app session.

- Backend: run rows (and the session detail of a cron run) carry
  `scheduler_owned` — the job's in-flight execution is held by a live
  process (pid + start-time fingerprint) and the session started under
  that claim. An older never-closed run of the same job stays a zombie.
- Desktop: the latch becomes a per-run verdict that is re-evaluated on
  every Cron surface poll and, authoritatively, right before any send
  (primary chat and tiles). A run that ticks, is owned, or closes becomes
  writable again; one whose process dies becomes view-only.
- Restored route/tab after a restart: the pre-send refresh recognises a
  cron run by its session id and gates it even though no surface ever
  evaluated it; an unreadable unknown run fails closed.

Refs #88443
2026-10-01 09:44:06 -04:00
..