Skip to content
CodeBook

Factory supervision

Specialist supervisors per failure class, a factory supervisor above every workflow, one supervisor per piece of work at a time, and replanning the unmet rest of a work order.

A workflow's manager is asked when the rules run out or work is quietly stuck: a card blocked with nowhere to go, a run that cannot start, a refused handoff, a wait that is not ending. This page is what sits above it: a fixed ladder that only goes up, where rules pick who is asked and a model only ever chooses from a closed list.

Open Factory settings → Factory supervision. It explains the ladder, holds the factory supervisor form and the specialists per workflow, and lists every decision any rung has made, with the rung, the agent and why.

The ladder

Supervisors honor the installed agent's model policy, then the factory policy, then the organization's default. The stuck card's station does not override the supervisor's model. Change a specialist or factory supervisor's agent policy under Agent marketplace → Your agents → Model; workflow managers also expose it directly in Manager settings. Model choice does not expand the supervisor's allowed actions.

  1. The workflow level. When a run fails, the failure is classified by a table — contract, checks, evaluation, runtime, worker, crew, routing or retries — from the run's failure code and situation. If the workflow has a specialist supervisor registered for that class, the specialist acts first; otherwise the workflow supervisor does. There is no separate "security" class: a failed security review is an evaluation failure. Both share the workflow's intervention limit per piece of work.
  2. The factory supervisor. One per factory. It is asked when the workflow level escalates — the model chose to escalate, its limit was reached, its agent is missing, or the handoff it chose was refused — and by a scan every minute or so that raises a call waiting past its limit, a work order stuck in two or more workflows, or repeated handoff refusals of one piece of work.
  3. A person. Past either of the factory rung's limits — per piece of work and per work order — a person is asked and the decision is recorded as decided by the limit, with no model call. Budget stops and a supervisor's own failure skip every model and go straight to the person.

A station or crew run that stops because its card, memory, tools, roster or pause state changed while it was working ends blocked as superseded and does not climb the ladder: no retry, fallback or supervisor is queued for it. See what the worker reads.

What the factory supervisor may do

Each option is offered only when the rule that would carry it out lets it through:

  • Reroute along a declared route from the card's workflow into another workflow of this factory, after the loop check. Doors to other factories are never offered.
  • Reassign to an intake of another workflow in the factory.
  • Pause the work order.
  • Replan the rest of a partially met work order, only when replans remain and the effective planner autonomy is above suggest.
  • Escalate to a person.

There is no retry at this rung, and a model asking for one is not obeyed. A destination that was not offered moves nothing and escalates.

One supervisor per piece of work

Two cards of the same piece of work stuck at once get one pending decision, not two. The claim is taken by a conditional update, carried up the ladder with the decision, and released when the piece is idle again. Every rung's brief includes the earlier decisions for the same piece of work, and each decision records its tier, failure class, supervisor, root card, work order and parent decision.

Replan the rest

A work order is partially met when it is open, at least one item finished and at least one is unmet — its card dropped, deleted, or stuck with nothing running. The work order shows the met and unmet lists, a Replan the rest dialog and the replan history.

The planner sees the goal, the met part with its artifacts, and the unmet part with the reasons. Every proposal must name which unmet items it covers; the planner has no retire tool, cannot touch an existing item or card, and cannot make a proposal depend on an unmet item. Proposals are ordinary proposed items under the usual planner autonomy rule. A work order allows three partial replans; the bound is taken by a conditional update and given back when the planner could not run.

Inspect a decision's input

Open the supervisor's run, then Context usage → Prepared model inputs, for each fitted model attempt, its input hash, instruction version and applicable memory references. The record belongs to the actual run and identifies its supervisor decision and tier.

The supplied situation and allowed actions are rebuilt before dispatch and checked again before a reply acts. Changed requirements, route destinations, prerequisites, work-order state, assignments, memory or policy stop the stale decision for review. It cannot route, retry or climb the ladder using that answer. Usage from a call that already ran is still recorded. A fresh decision is required; no automatic replay of the old prompt is implied.

Not built

  • Specialists and the factory supervisor are not part of the factory definition: blueprints, versions and rollback carry only the workflow supervisor.
  • Test factory does not simulate the factory rung or specialists.
  • Nothing here learns. Supervisors do not change their behaviour from outcomes.