On a plane, a turn the harness stopped is a failed turn: the row says why, the run is failed and its target is told, and a pod whose session stopped under it puts it to sleep then¶
Decision 750 · accepted · 2026-10-01 · issue #320
- The worker reports
failed_reason.turn_ended'sreason,tool_failures(the failure guard'sstop) oragent_failed(a root that crashed as often as it may be restarted), goes intosession.statusand the dormancy report besidedone_reason, from thatturn_endeduntil the root's nextuser_input; an activation reads it back from the log as it readsinterrupted. The words are the event's. The turn's end also rests the root in the report, because a root that crashed sends noagent_stateafter it. A field and not a newstatus, for 745's reason. - Not 745's
failed. The daemon'sfailedis{reason, detail}, foragent_failedonly, anddetail, the first line of what the agent raised, is content, which a plane never holds. A string under its own name carries the reason alone, for both stops, and no key a client reads changes shape between a daemon and a plane. - The plane keeps it on the session row, set whenever a report carries the key,
as
done_reasonis, and lists it insessions.listand a run's listing. A run whose session has one isfailed, awake or asleep (it readrunning, thencreated), and holds no place under its trigger's concurrency cap. The status page calls the row broken even asleep, since a root that kept crashing is always asleep after it; the review queue and the runs table name the reason. notify_urlis posted the outcome, read from the row. A report with a reason announces the run asdoneandinterrupteddo. The body'sstateis the run's state as a listing gives it,doneorfailed; it was the worker's status, so aninterruptedrun now saysfailed.done_reason, which the body named and was never given, is filled, andfailed_reasonis beside it.- The manager watches its tree. A tree that stops by itself (727) was noticed only
when the idle timer next looked, ten minutes on: the slot and the budget slice held,
and an activation answered
okfor a session that was not there. The manager now monitors the session it started and puts it to sleep when it stops, sending first a report the debounce held, since that is the one that announces. The cost is folded from the log left on the pod, because the projection that knew it went down with the tree and the dormancy report said0.
Governs: apps/troupe_plane/lib/troupe/plane/control/connection.ex, apps/troupe_plane/lib/troupe/plane/sessions/session.ex, apps/troupe_plane/priv/repo/migrations/20261001000750_session_failed_reason.exs, clients/gui/apps/desktop/src/views/bits.tsx, clients/gui/packages/client/src/fleet.ts, clients/gui/packages/client/src/plane.ts, clients/gui/scripts/fake-deployment.ts