Skip to content

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's reason, tool_failures (the failure guard's stop) or agent_failed (a root that crashed as often as it may be restarted), goes into session.status and the dormancy report beside done_reason, from that turn_ended until the root's next user_input; an activation reads it back from the log as it reads interrupted. The words are the event's. The turn's end also rests the root in the report, because a root that crashed sends no agent_state after it. A field and not a new status, for 745's reason.
  • Not 745's failed. The daemon's failed is {reason, detail}, for agent_failed only, and detail, 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_reason is, and lists it in sessions.list and a run's listing. A run whose session has one is failed, awake or asleep (it read running, then created), 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_url is posted the outcome, read from the row. A report with a reason announces the run as done and interrupted do. The body's state is the run's state as a listing gives it, done or failed; it was the worker's status, so an interrupted run now says failed. done_reason, which the body named and was never given, is filled, and failed_reason is 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 ok for 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 said 0.

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