
The Answer Is Optional: An Abstention Contract for AI
A practical guide to deciding when AI should answer, seek evidence, defer, or refuse using calibrated signals, risk–coverage curves, and fallback capacity.
Read MoreZharfAI Team

An agent completes a task, shows a plausible answer, and waits for a person to inspect every intermediate step. The model may be capable; the system around it is still manual. Removing that supervision does not mean asking the model to be more autonomous. It means giving each unit of work a test that can reject it, then arranging those units in a control flow that knows what may run, what must wait, what can run in parallel, and where a failure goes.
Hanako's widely shared “Loops and Graphs” article on X offers a memorable distinction: a loop improves one unit of work, while a graph decides which units exist and how they connect. This guide fully covers that model, but turns it into a production contract. The key addition is governance: checks must be executable, graph state must be typed and durable, retries must stay inside the failed unit, learned constraints must be reviewed and versioned, and human approval must sit at the boundary of greatest consequence.
The strongest idea in the original article is that a repeated action is not automatically a loop. A production loop has four stages:
produce → check → correct → repeat or stop
The check must be able to change what happens next. “No exception occurred,” “the answer looks good,” and “the model is confident” are observations, not acceptance tests. A gate produces a machine-readable verdict tied to evidence and routes the state to accept, correct, escalate, or stop.
The second useful distinction is architectural: the loop lives inside a node; the graph lives between nodes. A local loop can improve a translation, patch, extraction, or research slice. It cannot determine whether two slices are independent, whether a deterministic transformation should replace a model, or whether a dangerous action requires approval. Those are graph decisions.
This fits the broader engineering record. Anthropic's catalog of effective agent patterns separates prompt chaining, routing, parallelization, orchestrator-workers, and evaluator-optimizer loops. Google's Agent Development Kit workflow documentation likewise treats sequential, parallel, and loop execution as explicit control-flow structures rather than improvised prompting.
The model is therefore a useful design lens, not a complete runtime specification. A production implementation still needs state ownership, identity, persistence, concurrency rules, stop conditions, side-effect controls, and evidence.
Mixing these two contracts creates systems that are hard to test and impossible to recover safely.
| Concern | Local loop inside one node | Graph between nodes |
|---|---|---|
| Purpose | Bring one bounded artifact to an acceptance condition | Select, order, parallelize, join, and stop units of work |
| State | Attempt, candidate, feedback, evidence, budget | Run state, node states, dependencies, versions, approvals |
| Success | This unit passes its gate | The requested outcome is complete and releasable |
| Failure return | Same unit with scoped evidence | Replan, compensate, escalate, cancel, or terminate |
| Typical evaluator | Test, schema validator, source checker, rubric | Router, dependency rule, risk policy, merge gate |
| Human role | Clarify an ambiguous unit when necessary | Approve consequential or hard-to-reverse transitions |
A node should have one input schema, one output schema, one owner, one side-effect policy, and one local acceptance contract. An edge should name the state that crosses it and the condition that makes the destination eligible.
Ask one question about every edge: which exact output of the current node does the next node consume? If no variable, artifact, decision, or event crosses the boundary, the edge is probably a sequencing habit rather than a dependency. Remove it and the nodes may run in parallel. This is the concrete version of the original article's warning against treating every “and then” as an arrow.
The current LangGraph Graph API documentation formalizes a similar separation through state, nodes, and normal or conditional edges. Its documentation also notes that a node can be ordinary code, not necessarily an LLM. The concepts are portable even if a team uses a queue, workflow engine, state machine, or its own orchestration layer.
A loop becomes useful when its acceptance condition is defined before generation. Start with evidence that a program, qualified reviewer, or adjudicated evaluator can actually inspect.
Good gates include:
Weak gates include confidence, eloquence, absence of visible errors, or agreement from a second model that received the same assumptions. A model judge can help with open-ended properties, but it needs a written rubric, calibration against human-adjudicated examples, disagreement handling, and a deterministic outer gate for facts, schemas, permissions, and side effects.
Represent the verdict as data:
{
"unit_id": "handlers-auth",
"status": "reject",
"failed_rule": "test_auth_redirect",
"evidence": "expected 302; received 200; handlers/auth.py:88",
"allowed_scope": ["handlers/auth.py", "tests/test_auth.py"],
"attempt": 2,
"next": "correct_same_unit"
}
The verdict is not a report attached after the run. It is control data. If it cannot alter the next edge, it is observability—not a gate.
The linked article proposes splitter, worker, code node, and gate. That vocabulary is sufficient for many systems when each role has a narrow contract.
OpenAI's current agent orchestration guide distinguishes model-directed orchestration from code-directed orchestration and explicitly describes structured routing, sequential chains, evaluator loops, and parallel independent work. That is the practical design choice at each node: use model judgment where the path cannot be predetermined; use code where it can.
Do not let “multi-agent” become an objective. A single worker with reliable tools may beat a graph whose nodes duplicate context, disagree without a resolution rule, and pay model cost to merge strings. Add a node only when it creates a distinct information boundary, parallel unit, control, or specialization.
Parallel workers need separate working context. If four reviewers share a live scratchpad, the first finding anchors the other three and apparent diversity collapses into repetition. Give each worker the common brief, its own unit, the relevant evidence, and its local acceptance contract. Do not stream peer conclusions into its context unless collaboration is part of the planned method.
The join node should receive structured outputs and provenance, not four uncontrolled transcripts. It can deduplicate findings, detect conflicts, and request targeted adjudication without asking a general model to reread everything.
When one of four units fails, return one unit. Returning the entire batch rewrites three accepted results, expands cost, and introduces three new sources of variance. A correction packet should include:
This is more than efficiency. Scoped correction protects already verified work. It also makes a retry idempotent and reviewable. The related guide to durable AI agent workflows covers persisted state, replay, idempotency, cancellation, and compensation when nodes can outlive a process or interact with external systems.
A working graph needs two different return paths.
The correction edge is short: a gate sends a rejected unit back to its producer with evidence and scope. It fixes the current run. The original article correctly emphasizes that this return should target the unit, not the batch.
The learning edge is long: a confirmed lesson becomes a candidate constraint for future splitting, routing, tools, or gates. It can prevent the same failure across later runs. For example, “adapters must preserve keyword arguments exactly” belongs in the brief used to create later porting units, not only in one worker's temporary feedback.
Production systems should not let one successful or failed run rewrite future policy automatically. Treat learning as a governed change:
observed failure → evidence review → candidate constraint → regression test → approval → versioned release
Store the source runs, applicability, owner, expiry or review date, and tests for every learned constraint. Detect conflicts with existing rules. Roll it out on historical traces and a canary population before broad use. A learning edge without this firewall can turn an outlier, evaluator bug, attack, or stale exception into permanent behavior. Our production-learning feedback firewall provides the broader promotion and rollback pattern.
Build this edge last. A system cannot learn reliably from “accepted” results until acceptance itself is trustworthy.
“Repeat until green” is unsafe without ceilings. Each local loop needs independent exits for:
The linked article recommends escalating after three failed corrections because the problem may be in the plan rather than the worker. Three is a useful default for many content and coding tasks, not a universal constant. Set the cap from the cost of an attempt, expected correction rate, risk, and evidence from historical runs. More importantly, route exhaustion to replan, human_review, or failed; never convert it into an implicit pass.
Hash relevant state and compare attempts to detect cosmetic activity. A model that rewrites prose while the same test fails is busy, not progressing. Also propagate cancellation through queued children so a graph does not keep spending after its purpose disappears.
Confidence is a poor authorization signal. It may be uncalibrated, task-dependent, and generated by the same component seeking permission. The stronger question is what happens if the proposed transition is wrong.
Use at least three lanes:
| Lane | Examples | Default gate |
|---|---|---|
| Reversible and contained | draft copy, isolated test, covered local function | deterministic checks; automated release may be allowed |
| Reversible but wide | shared library, policy template, schema addition | deterministic checks, trajectory review, staged rollout, accountable approval |
| Hard to reverse or externally consequential | deletion, migration, production-data write, payment, legal or safety decision | closed automated lane; authorized human decision before execution |
This is a ZharfAI engineering recommendation derived from consequence-based risk management, not a threshold supplied by the linked post or a framework vendor. The NIST AI RMF directs organizations to assess deployment in context using relative risks, impacts, costs, and benefits, and to use human judgment when selecting metrics and thresholds.
Inside an open lane, read evidence in a stable order: deterministic results, trajectory and scope, historical rollback or escape rate for that node, independent evaluation, and model self-assessment last. Place the person where authority changes the outcome—usually approval of a consequential merge or action—not between every harmless intermediate step. The detailed pattern is in human approval design for AI systems.
Suppose an agent system must update authentication behavior across a service without changing public API responses unexpectedly.
The graph is valuable because it protects independent work, exposes the critical path, and localizes rejection. The local loops are valuable because each unit can correct itself without a person watching every attempt. Neither replaces the other.
A useful graph state is more than chat history. Persist at least:
Checkpoint at committed transitions. Do not restore a run by asking a model to infer state from a transcript. If a worker can perform side effects, persist the intent and idempotency key before execution, then reconcile unknown outcomes before retrying.
Framework behavior varies. LangGraph's workflow and agent patterns demonstrate parallelization, orchestrator-workers, and evaluator-optimizer structures, while its persistence layer can preserve graph checkpoints. Teams still need to document the guarantees of their selected runtime, datastore, queue, and external systems.
An output score cannot reveal whether the graph wasted work, repeated a dangerous action, hid a failed gate, or passed only after uncontrolled retries. Collect one end-to-end trace with child spans for nodes, model calls, tools, handoffs, gates, corrections, approvals, and side effects. OpenAI's Agents SDK tracing documentation is one current implementation example; use equivalent vendor-neutral telemetry if that better fits the system, and apply privacy controls to captured inputs and outputs.
Track metrics at four levels:
Replay a fixed regression set when a prompt, model, splitter, gate, state schema, tool, or learned constraint changes. Grade trajectories as well as outcomes: which nodes ran, what evidence they saw, which tools they used, what was retried, and why the run stopped. A system that produces the right answer through an unauthorized path is not healthy.
Test these conditions deliberately. Kill workers around commits, repeat events, corrupt one unit, create conflicting patches, expire approvals, cancel mid-fan-out, force an evaluator disagreement, and replay historical traces under the new graph.
Start with one repeated, bounded workflow that already has a clear result and expensive manual inspection.
Do not begin with a fleet. Begin with a gate that can fail loudly and a state record that can explain why. The production milestone is not “the agents ran without us.” It is “the system completed bounded work, rejected invalid units, stopped within budget, preserved evidence, and asked a person only for the decision that required human authority.”
Before release, confirm:
If a required answer is no, keep the lane closed. A loop without a real gate is repetition. A graph without scoped state and consequence controls is only a faster route to unverified work.
The linked X article supplies the loops-and-graphs framing and practical heuristics. The architecture, control rules, and readiness checklist above are ZharfAI analysis cross-checked against current primary or official documentation.

A practical guide to deciding when AI should answer, seek evidence, defer, or refuse using calibrated signals, risk–coverage curves, and fallback capacity.
Read More
Rare events change what an AI alert is worth. Use deployment prevalence, missed cases and review capacity to choose a threshold that your operation can actually support.
Read More
A field guide to atomic reservations, concurrent spend, approval binding, reconciliation, and hard economic limits for tool-using AI agents.
Read MoreIf this note maps to a real system in your organisation, start with the services page or a shipped case study.