Manuscript Offprint

arXiv:2610.34620

Built to Remember, Shipped to Forget: Operational Contracts, Failures, and Repairs in Containerized LLM Agent Deployments

Meriem Mastouri, Emna Ksontini, Amine Barrak

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Meriem Mastouri

University of North Carolina Wilmington

Wilmington, NC, USA

mastourim@uncw.edu

Emna Ksontini

University of North Carolina Wilmington

Wilmington, NC, USA

ksontinie@uncw.edu

Amine Barrak

Oakland University

Rochester, MI, USA

aminebarrak@oakland.edu

Abstract—LLM agent systems reach production as container images run by platforms such as Docker, Compose, and Kubernetes. Framework and platform document opposite expectations: to the platform a container is disposable, while the framework persists conversations, pauses runs for human input, and resumes interrupted work from saved state; each side specifies only its own behavior, so the obligations their composition creates are stated nowhere. We present the first empirical study of this boundary, stating these obligations as operational contracts: guarantees a deployment must provide to preserve an agent system's required behavior when a deployment-platform event occurs. From the first-party documentation of LangGraph and the three platforms we derive 14 contracts and evaluate them with three independent sources of evidence: 433 deployed open-source agent systems, seven events induced on 12 of them, and 122 developer repairs mined from 39,261 commits, pull requests, and issues. At least one contract applies to 75.5% of the systems, yet its guarantee is routinely missing: of systems that must keep state beyond the process, 37.4% lose it to a restart and 41.5% to a container replacement, and every assessable deployment stops the framework's production server mid-drain. Induced events turn 14 of 16 predicted violations into runtime failures and all seven predicted holds pass. The failures are born in deployment but repaired in code: developer repairs independently cover twelve of the fourteen contracts, 78% change application code, and only two in three fully restore the violated guarantee. The 14-contract catalogue, detection rules, fault-injection harness, and 35-pattern repair taxonomy provide a basis for checking and strengthening agent deployments.

Index Terms—LLM agents, LangGraph, containerization, failure, fault injection, mining software repositories

I. INTRODUCTION

Industry surveys report that a majority of organizations are adopting LLM agents, with over a third already running them in production [1], [2]. An agent system is an application in which an LLM plans, calls tools, and acts over multiple steps on a user's behalf, and it reaches its users the way any service does: packaged as a container image and operated by a platform such as Docker, Compose, or Kubernetes [3], [4]. Agent frameworks endorse this path and instruct developers to package agents as Docker images [5]. Yet empirical studies of agent development consistently rank deployment among its hardest steps [6], [7].

One reason is that the platform and the framework document opposite expectations about the running container. To the platform, the container is disposable, designed to be stopped and replaced during normal operation, with nothing of lasting value inside: a stop sends SIGTERM and kills the process after a grace period of ten seconds by default [8], an update replaces the container and discards its writable filesystem [9], [10], and anything that must survive these events is expected to live in volumes outside it [11], [12]. To the framework, execution is anything but disposable: agents carry conversations across requests through a checkpointer [13], pauses a run indefinitely until a person approves the next action [14], and resumes interrupted work from saved state, and warns that resumption may re-execute steps completed before the interruption [15], potentially repeating external actions such as sending an email, charging a payment, or provisioning a cloud resource. Each side specifies only its own layer, so whether a deployed agent satisfies both at once is settled by its artifacts.

Research has approached this junction from two directions. Empirical studies of deployment artifacts quantify defects, smells, and misconfigurations in Dockerfiles, Compose files, and infrastructure-as-code, and build detectors for them [16]–[21]; the rules they check encode platform best practices that apply to any containerized service, independent of the application inside. Empirical studies of LLM and agent applications characterize bugs, failures, and development challenges within the application [6], [7], [22]–[24]. However, no work identifies the obligations that arise only when one layer's requirements are composed with the other's lifecycle semantics. Consequently, we do not know what containerized deployments must guarantee for agent systems, how often real deployments provide these guarantees, whether violations become observable failures at runtime, or how developers repair them.

In this paper, we present, to the best of our knowledge, the first empirical study of the operational boundary between an agent framework and container platforms. We introduce the operational contract (OC): a guarantee that a containerized deployment must provide to preserve an agent system's required behavior when a deployment-platform event occurs. We select LangGraph for two reasons: it belongs to the most widely adopted open-source toolchain for LLM application development [25], [26], an ecosystem in which 57% of surveyed teams report running agents in production [27] and it explicitly supports containerized deployment [5]. Our study follows the boundary from specification to practice. We first derive operational contracts from the first-party documentation of the framework and deployment platforms, then examine them through three independent sources of evidence: deployment artifacts from 433 open-source agent systems, controlled executions that induce seven deployment-platform events on 12 systems, and developer repairs mined from repository histories. We make four contributions:

• We derive a catalogue of 14 operational contracts from first-party documentation.

• We assess the contracts on 433 deployed open-source agent systems: at least one applies to 75.5%, and violation rates range from 11% to 100%.

• We confirm the violations at runtime: under fault injection on 12 systems, 14 of 16 predicted violations manifest as failures, and all seven predicted holds pass.

• We study how developers repair violated contracts: from 39,261 mined commits, pull requests, and issues, we identify 122 repairs and extract 35 recurring fix patterns

The contract catalogue provides practitioners with concrete deployment requirements and tool builders with specifications for automated checks. The repair taxonomy identifies guarantees developers implement in application code, suggesting stronger framework and platform defaults.

Replication Package. All material, prompts and data used in our study are available in our replication package [28].

References (71)