Files
loki/scripts/test
Cato c0ab1f8644 fix(runs): a run with no agent is never Working or Needs you (#1749)
Run status now reconciles with the runner (lib/run-status), once, in the
run-track loader that /api/control/sessions, Watch and the run and command
routes all read:

- an open run whose agent the runner no longer has (a fresh snapshot taken
  after delivery does not list its tab, or the runner reported the agent
  exited) is Failed, cause agent_gone, "Agent exited without answering;
  Retry" (botsmann 51bbcc27 and loki 3a5a7c2b read Needs you with nothing
  listening);
- a finished run is Done or Failed, keeping what is left to do with its
  change in nextAction (six sessions read working weeks after their agents
  finished);
- the run and command routes take the run's status over the track's live
  word, so they cannot disagree with the session list.

A pull request the agent named in its handoff and opened during the run is
the run's even on a branch the runner never saw: an agent working in its own
worktree pushes from another branch than the session's checkout, and run
57632eae's track said "Nothing reached GitHub" beside loki#1747. Loki still
acts only on pull requests from the run's own branches.
2026-11-29 19:54:25 +01:00
..
…
…
…
…