Manuscript Offprint

arXiv:2611.01930

RECEIPT: Measuring and Repairing the Return Assumption of LLM Agents in Web Service Operations

Boyang Yang, Ziyao Yang, Yu Zhang, Duo Chai, Xiaoming Chen, Haoye Tian

Boyang Yang¹, Ziyao Yang¹, Yu Zhang¹, Duo Chai², Xiaoming Chen³, Haoye Tian⁴

¹Yanshan University, ²Tencent, ³Shenzhen Intelligent Strong Technology Co., Ltd., ⁴Aalto University

LLM agents operate Web infrastructure from the command line and rely on a return assumption, namely that each tool call returns within a bounded time and with its requested action finished. Many commands, however, ask a question before they act, and the agent’s harness either closes the program’s input or keeps it open, for example, as a terminal at which nobody types. With closed input, the program can return status 0 without the requested action. With open input, the program waits until a time limit, and the agent pays in time and tokens. In both cases, the agent can misjudge the command, and leaderboards rank the harness’s input connection together with the LLM. To the best of our knowledge, this paper is the first to measure and repair the return assumption. To measure it, we collect 91,469 production tool calls and 89,047 public agent trajectories, and we test how 8 widely used harnesses launch commands. We also build LITMUS, a catalog of 158 command-line invocations whose requested action we check, and TRIPWIRE, a benchmark of 25 task pairs that differ only in whether a question guards the requested action. To repair the return assumption, we propose RECEIPT, which keeps the input open, reads what each process waits for from system calls, and returns this state to an unmodified agent. A model checker verifies the protocol that orders RECEIPT’s input delivery, interruption, and report.

On LITMUS, closed input causes 11.5% of tested invocations to return status 0 without performing the requested action, and 7 of 8 harnesses close input when no terminal is attached. In real use, public trajectories contain 1,345 calls that wait for input, and production agents issue 2,910 commands that only check whether a process is still alive. On 15 TRIPWIRE task pairs, an unanswered question at a plain terminal multiplies a task’s token use by 2.9, and the input connection moves Llama-3.3-70B from 7th to 3rd place among 8 LLMs. Across 5 LLMs, RECEIPT reduces false claims of success by 73.5% relative to closed input and uses 24.4% fewer tokens than a plain terminal. It reports 85.0% of the tested waits without false positives, and on a second harness with a persistent terminal it completes all 25 tasks whose question guards the requested action. In a commercial agent runtime, RECEIPT’s checks take a median of at most 0.54 milliseconds per shell call. An agent’s reliability therefore depends on what its harness lets it observe as well as on its LLM. Agent builders should report what each tool call did, not only how it ended, and benchmark maintainers should fix and report the input connection before they rank LLMs.

Keywords: LLM agents, Web infrastructure, agent harness, tool execution, process state

Date: November 1, 2026

Correspondence: Haoye Tian

Figure

1 Introduction

Agents built on large language models (LLMs) operate Web infrastructure from the command line [5, 27, 34]. They push releases, install dependencies, migrate databases, rotate keys, and restart containers. Many of these commands ask a question before acting, such as a confirmation, a passphrase, or a message in an editor. The agent does not talk

Figure

Figure 1 Closed input turns a destructive confirmation into a false success, terminal input turns it into a 30-second wait, and RECEIPT reports it to the agent.

to the program directly. The agent’s execution harness starts the program, chooses the connection that carries the program’s input, and returns the output and exit status to the agent. The harness therefore decides what the question receives.

Closing the input and keeping it open can both lead the agent to misjudge the command. If the harness closes the input, the program reads end of file and takes its default. In the left run of Figure 1, the migration script drops a database and still returns 0, and the agent reports that the rows “are still present”. For a Web service, this return resembles a 200 OK response with an error in its body. In Web operations, such a default can drop production data or create a key without a passphrase. If the harness keeps the input open, nobody answers, and the command waits until a time limit, as in the middle run of the figure. The agent then waits, retries, and pays in time and tokens. Agents choose their next step from tool results [43]. An agent therefore relies on a return assumption, namely that each tool call returns within a bounded time and with its requested action finished.

The return assumption also distorts how LLMs are compared. Benchmarks score the final state [19, 27], but they do not record what the process waited for. A leaderboard therefore ranks the harness’s input connection together with the LLM, and teams use this ranking to choose an LLM. In real use, the same questions stall agents. The public trajectories that we study contain 1,345 calls that wait for input, and 616 of them occur in Web operations tools.

Existing research handles a command before, during, or after execution, but leaves open what the command still waits for when the tool call returns. Before execution, pre-launch checks repair missing non-interactive options [11] or verify a command’s risk [44]. During execution, non-blocking interfaces expose interactive tools [1], and asynchronous execution lets agents continue during delayed calls [16, 32]. After execution, false-success detectors read trajectories [2], postcondition wrappers verify the requested effects [26], and outcome monitors check a result against contracts mined from traces [31]. DeepSeek’s process inspector [9] comes closest, because it checks whether a running process waits on its standard input.

We see 3 gaps in measuring and repairing the return assumption:

① Measurements do not observe the process. Public benchmarks do not design tasks in which a question guards the requested action [19, 27]. A skipped action also returns status 0, so a trajectory classifier [2] and an outcome monitor [31] can read it as a true success. No study shows how often agent commands wait in real use or what each harness does with the wait.

② Detectors read output text or silence. A prompt pattern misses a question that never reaches the output, and an inactivity watchdog ends a command that is still computing. DeepSeek’s inspector sees only standard input, whereas a password prompt reads the terminal.

③ Intervention in a persistent terminal has a race. A harness that types the agent’s keystrokes into a terminal can deliver a queued cd to a script that has just asked, so an intervention needs a fixed order of input, interruption, and report.

We address each gap in this work and build RECEIPT, which returns the process state to the agent, as in the right run of Figure 1. For ①, our catalog LITMUS records the process state of 158 prompting invocations under 3 input connections, and we test 8 harnesses. Our benchmark TRIPWIRE has 25 task pairs, and in each pair only the trap variant asks a question before the requested action. A verifier of the requested effect scores each run, so a skipped action counts as a failure. We also count waits in 91,469 production tool calls and 89,047 public trajectories. For ②, RECEIPT reads from the kernel what each thread waits for and on which descriptor. For ③, we state the order of input, interruption, and report as properties of a finite automaton, and a model checker verifies them.

Our results lead to 3 findings. First, closing input does not make a command safe, because 18 of 156 prompting invocations then return status 0 without performing the requested action. Second, keeping input open has its own costs, because an unanswered question at a plain terminal multiplies token use by 2.9, and a persistent terminal can deliver the agent's next keystroke as the answer. Third, a leaderboard ranks input connections as well as LLMs, since the input connection moves Llama-3.3-70B from 7th to 3rd place among 8 LLMs. Returning the process state reduces these failures without changing the LLM. RECEIPT reports 85.0% of the tested waits without false positives, and across 5 LLMs it reduces the agent's false claims of success from 34 with closed input to 9. On Terminus 2, a second harness with a persistent terminal, RECEIPT completes all 25 trap tasks.

The main contributions of this work are as follows:

  • Problem and finding. We define the return assumption and show that it fails under both input connections, so that an agent's reliability depends on what its harness lets it observe as well as on its LLM.
  • Measurement of real-world use. The first measurement of input waits in agent use covers 91,469 production tool calls of 6 developers, 89,047 public trajectories of 23 harnesses and 19 LLMs, and 8 harnesses under test.
  • Datasets and benchmark. We build LITMUS with 158 checked prompting invocations and WAITATLAS with 4,855 commands from 668 package families. We also build TRIPWIRE, the first benchmark in which a question guards the requested action, with 25 task pairs.
  • Solution, validation, and release. RECEIPT identifies from system calls what each process waits for, orders input, interruption, and report through a model-checked protocol, and returns the process state to an unmodified agent. We evaluate it on 2 harnesses and 8 LLMs, compare it with 2 published baselines, and release its detector in a commercial agent runtime.

References (35)