Agent loops, state and human oversight 00:00:01 A parcel with two calls left The tracking clerk has two calls left and an order number. Her controller can ask the depot, inspect its reply, and decide whether another call is useful. If the first call already verifies the location, spending the second buys nothing. A loop turns a model proposal into an observed change in state. The controller owns the run identity, limits and stop rule. Tools return evidence or explicit errors. Human approval can intervene before a consequential step. On the board keep the request, the last verified observation, a remaining budget and a stop condition. A generated sentence goes in a different field from the result returned by the depot. 00:00:43 Observe, update and stop The host records the user goal, current observations and remaining budget. The model proposes an allowed read. The gateway checks ownership and returns a typed result. The observation is added to state with its source and timestamp. The goal has a verifiable answer. A second identical lookup adds cost without new evidence, even though one budgeted call remains. If the controller allows at most four action steps and at most two external calls per step, there can be at most eight calls, provided downstream retries also obey the budget. 00:01:18 Account for every external call A loop reads current state, chooses a bounded action, executes it through the host and records the observation. Stop on a verified result, a human handoff, a deadline or an exhausted budget. A model declaring success is not sufficient if the external operation never completed. The agent has found order 42 and has one call left. Stop on verified goal completion rather than spending the remaining allowance. A stateless call receives everything it needs in the request. A stateful application can recover history from a durable run ID. Storing a transcript alone may miss pending actions and approval status. Persist the fields required to resume safely after the process restarts. Restart a worker after it asks for approval. A durable record should show which operation is pending, its exact amount and its owner. Linear, conditional, looping and parallel control flows carry different failure modes. A parallel branch may finish after its sibling has changed shared state. Define how updates merge, whether late results remain eligible and who decides that the run is complete. Let two branches update the same itinerary. Decide whether their updates append, replace or conflict before executing them in parallel. Compare the proposed action, the actual external outcome and the state used for the next turn. This detects loops that claim success without an effect, repeatedly consult the same evidence or resume from an obsolete checkpoint. 00:02:50 When a timeout sounds like delivery The tool times out and the model says “delivered.” Which state should the controller record? No observation supports the reported delivery. A timeout is a failed lookup, not evidence that a shipment reached its destination. A timeout leaves the location unresolved. Record that uncertainty, then retry within the shared bound or hand off. A successful loop can finish early because the necessary evidence actually arrived.