Skip to content

Safe Continuation in LLM Agents: Runtime and Tool-Contract Boundaries

Zihao Wang

cs.SE

Abstract

LLM agents increasingly act on stateful tools through runtimes that can retry, checkpoint, and recover. Yet once execution becomes uncertain, the next safe action may depend on distinctions that are no longer visible to the agent: a timeout can hide whether an external effect committed, a crash can erase invocation state, a stale read can invalidate a planned write, and a terminal report can disagree with the resulting world state. We ask where the guarantee needed for safe continuation should live: in model policy, the agent runtime, or the tool contract. Weformalize operational ambiguity as the case in which two execution histories require incompatible safe continuations but induce the same agent-visible observation. We then use a controlled interface intervention framework that fixes the task, backend, fault, controller, and model while varying the operational semantics exposed or enforced at the agent-facing boundary. In a frozen three-model pooled analysis, selective discovery reduces exposed tool context by about 4,013 tokens while satisfying a recall non-inferiority criterion; resumable invocation and durable state each improve recovery by 1.00 on their matched failures; effect-aware interfaces reduce duplicate effects and unsafe commits by 0.569 and 0.500; and postcondition verification reduces incorrect terminal claims by 0.278. Mechanism-by-fault negative controls show that these effects are failure-specific rather than a generic benefit of a richer interface.

Create a lesson