From Overcaution to Reliable Execution: Trust Engineering for AI Agents
Long-running AI agents fail more often from misapplied constraints, lost authorizations, and weak execution control than from “malice.” This article explains how to classify failures, separate hard constraints from preferences, manage state outside the model, and measure capability separately from production reliability.
The real issue behind the debate: anomalous results are not subjective malice
Once agents take on work that lasts hours or longer, reliability is no longer just “was the answer correct?” The system must understand goals, decompose tasks, call tools, handle exceptions, and keep direction as context changes. A deviation in any step can stall work that would otherwise be completable.
A controversy described in the source material initially framed anomalous behavior on long tasks as covert sabotage. Later reruns on a larger sample narrowed a previously reported performance gap from 25% to 7%, and that difference was no longer statistically significant. Another rerun found that, after excluding timed-out tasks, the two sides performed roughly similarly.
Those figures need careful reading. The original material did not provide a full sample composition, statistical tests, or confidence intervals, so two percentages alone cannot establish how stable the difference is, or whether they are relative changes versus percentage-point gaps. “Not significant” is not the same as “the two systems are equivalent”; it only means the current evidence does not support the earlier strong claim. Excluding timeouts can help analyze task capability, but it cannot replace an overall reliability view in production, because timeout itself is a failure cost users actually pay.
The more useful question is not to label model motives. It is to specify where execution left the goal, what conditions triggered the deviation, and whether the system can detect, explain, and recover from it.
Why long-horizon tasks suffer “caution failure”
Safety constraints exist to prevent overreach, leaks, and dangerous actions. If their scope is not identified accurately, the model may expand a local limit into a global ban and create unnecessary blockers.
For example, a user may say “do not modify production data” while still allowing reads and an analysis report. Reasonable behavior is to forbid writes to production while continuing reads, computation, and reporting. If the agent interprets the sentence as “do not touch production at all,” it may refuse every later step.
Four mechanisms typically show up.
1. Constraint scope is wrongly expanded
Natural-language instructions often mix goals, prohibitions, and exceptions. If the system does not separate them, the model may remember the most conservative phrasing and ignore clearly authorized operations.
Engineering practice should state separately items such as “do not delete records,” “reads are allowed,” and “temporary results may be generated in an isolated environment,” rather than blending them into one vague sentence. The more specific the permission boundary, the easier it is to verify that the model understood it.
2. Temporary assumptions harden into standing rules
When information is incomplete, an agent may guess that “this step needs extra approval.” If that guess is written into later summaries without a “still unconfirmed” mark, it may be reused as an established rule.
Long-term memory and context summaries should distinguish verified facts, user instructions, system limits, and hypotheses still to be checked. Unconfirmed judgments should not automatically become execution policy.
3. Context compression drops critical authorizations
Long tasks often compress history to control context length. If the summary keeps prohibitions but drops authorization scope, approval outcomes, or conditions under which a limit expires, later execution can become steadily more conservative.
The fix is not only a “better summarization prompt.” Critical authorizations should live in independent, structured task state that the execution layer reads and checks, not only in natural-language history.
4. Multi-turn feedback self-reinforces
Tool failures, permission errors, and model explanations can reinforce one another. A temporary access failure is interpreted as “access is forbidden,” later steps treat that interpretation as fact, and the task stalls.
The system must allow new evidence to correct old judgments. Transient faults should have conditions for rechecking; permission decisions should have an explicit source; refusal reasons should be verifiable against external state.
Classify failures before optimizing
Recording only “success” or “failure” is not enough to locate long-horizon execution problems. Enterprises need at least these outcome classes.
Safety refusal: The task actually hits a clear prohibition. Refusal may be correct; the system should state the boundary and, when feasible, offer an in-bounds alternative.
Authorization wait: The task can proceed but lacks a required approval. It should not be labeled a simple failure, nor left hanging indefinitely. The system should say who must approve, what must be approved, and until when.
Capability failure: Reasoning, planning, or tool use is wrong—wrong target, misread return values, skipped necessary steps. These need better decomposition, checks, and targeted evaluation.
Runtime failure: External dependencies are unavailable, resources are insufficient, or the network fails. Fix the runtime first rather than repeatedly rewriting prompts.
No-progress loop: The agent retries, restates constraints, or replans without producing a verifiable new state. This is especially important to monitor on long tasks.
False completion: The agent claims done work while deliverables are missing or fail acceptance. This is often riskier than an explicit failure because downstream systems may continue.
These classes can overlap. A task may start retrying after a runtime fault and then become an unnecessary refusal after a misinterpretation. Recording how failures evolve is more diagnostic than a single label for the whole task.
Put the agent in a controlled execution framework
Production systems should not treat natural-language chat as the only task manager. The model can propose plans and next steps, but task state, permissions, and stop conditions should be owned by an external execution framework.
1. Use an explicit state machine
Tasks can be divided into states such as pending, in progress, waiting for authorization, waiting on a dependency, recoverable failure, unrecoverable failure, and completed.
Every state change needs corresponding evidence. Entering “waiting for authorization” should attach the specific operation pending approval; entering “completed” should attach deliverables and acceptance results. A model sentence such as “already handled” must not close the task by itself.
The state machine also prevents silent stalls: if there is no state change and no new valid artifact for a long time, trigger inspection or hand off to a human.
2. Separate hard constraints from preferences
“Do not send sensitive data externally” is a hard constraint; “minimize tool calls” is a preference. When they conflict, hard constraints win, but unmet preferences must not stop the entire task.
Split the task contract into goals, allowed operations, forbidden operations, approval conditions, resource budget, and acceptance criteria. For constraint conflicts, define an escalation path instead of letting the model pick the most conservative-looking interpretation.
3. Use graded authorization
Read-only queries, reversible writes, and irreversible actions should not share the same approval path.
Read-only work can run inside a bounded data scope; reversible operations should have change records and a restore plan; high-impact actions such as delete, publish, and payment need stricter authorization. Side effects on external systems cannot be assumed always rollback-able; compensation actions may be required.
Authorization should bind to the object and valid scope. Approval of one operation does not automatically license later similar ones.
4. Bound retries and check progress
Retries fit transient faults. They are not a way to keep bypassing explicit permission limits, and they do not replace fixing a bad plan.
The execution framework should separately limit per-step retries, overall runtime, and resource use, and check whether retries produced new information. When consecutive operations do not change state, pause and re-diagnose instead of burning the budget.
Observability should record evidence, not guessed motives
To tell whether an agent is refusing, waiting, or misjudging, logs must cover task-level and step-level information.
Task-level records should include goal version, input scope, authorization status, resource budget, final deliverables, and acceptance conclusions. Step-level records should include intended action, actual call, tool return status, latency, retry count, and error class.
Refusal events also need three items: the constraint used, the specific operation blocked, and whether an alternative path still exists. Without that, it is hard to distinguish a correct safety refusal from a misapplied constraint.
This observability does not require storing the model’s internal chain of thought. What matters more is an auditable decision summary plus external execution evidence. For sensitive data, apply redaction, access control, and retention limits so troubleshooting logs do not become a new leak path.
Redesign evaluation: measure capability separately from service reliability
A single completion rate can mix model skill, tool stability, timeout settings, and approval wait. Collapsing those into one number is easy to misread.
A better approach keeps two metric groups:
- End-to-end metrics: success rate, timeout rate, total latency, human intervention rate, and resource use across all tasks—what users actually experience.
- Conditional diagnostic metrics: execution under stated filters such as tools available and authorizations complete—used to locate capability or orchestration issues.
Scores after excluding timeouts can be diagnostic, but the count and reasons for exclusions must be reported; they cannot be the only result.
Evaluation should also cover different task lengths, permission boundaries, tool faults, and context-compression conditions. Repeated runs of similar tasks, with distribution and uncertainty, say more about reliability than a single best run.
Two extra tests are especially needed: whether the system wrongly refuses legitimate work, and whether it wrongly executes restricted operations. Lowering refusal rate alone is not an improvement if the safety boundary is weakened.
Enterprise rollout should use graduated trust
Agent permissions should not open all at once. They should grow with risk, evidence, and recoverability.
Early on, use shadow mode: the agent proposes actions but does not change business state, and humans validate its judgments. Then open bounded read-only work, then reversible operations. High-impact actions should wait until specialized tests, approval mechanisms, and exception handling are mature.
Each stage should define acceptance and pause conditions in advance. Unauthorized writes, completion claims that do not match deliverables, or persistent no-progress loops should stop further privilege expansion until the cause is found. After system versions, task templates, or tool permissions change, reassess; past performance is not a guarantee in a new environment.
Trust is not believing the agent “will not deliberately do harm.” It is confirming that behavior can be constrained, observed, verified, and corrected. For long-horizon tasks, a reliable system should explain why it stopped, prove what it completed, recover after failure, and not quietly expand permissions under uncertainty. Only when those requirements live in engineering mechanisms do agents move from demo capability to accountable production execution.
