Est.

Dependency Poisoning Race Conditions and Noisy Neighbor Failures Inside Shared Agent Runtimes

Multiple failure modes threaten safety when cloud coding agents share runtime infrastructure.

· 9 min read
Cover illustration for “Dependency Poisoning Race Conditions and Noisy Neighbor Failures Inside Shared Agent Runtimes”
Cloud Agent Environments · November 7, 2026 · 9 min read · 1,988 words

Isolated VM environments for cloud coding agents provide a hardware boundary for execution, but safe operation also requires controls on shared state, dependencies, credentials, and network connections. Dependency poisoning, race conditions, and noisy neighbor failures arise at different layers, so no single sandbox resolves them all. Running Claude Code or another cloud coding agent in production safely means containing each agent’s execution while governing what it can read, change, consume, and reach.

Why shared runtimes create a structurally different class of failure than shared databases

A plausible but wrong agent answer can start with corrupted infrastructure even when the reasoning is sound. A database error may surface as an invalid record, while an agent can turn that record into a coherent explanation. The model reasons faithfully over the wrong input. Teams can therefore spend days or weeks adjusting prompts when the fault is a race at the state layer.

Shared runtimes extend this problem beyond database concurrency. Agents can install packages, write files, access credential stores, and control browsers, so their execution environment becomes part of the system’s correctness boundary. Shared mutable state permits lost updates, shared registries spread poisoned dependencies, and shared compute lets one agent disrupt another’s work. These are distinct failure classes with different controls. Conventional distributed-systems knowledge remains necessary, but it must account for agents that both interpret corrupted inputs and act on them.

How the read-modify-write race corrupts shared agent state

A read-modify-write race can lose work without an error being reported. Concurrent agents read the same record, make independent changes, and write back their separate versions. The last write preserves only its author’s view. A downstream agent then reads the surviving state and produces an analysis that appears reasonable because the corruption happened before generation began.

The LangChain community forum describes a case in which five Claude Code agents worked on the same Express.js repository. The agents reported success, the build passed, and the repository looked normal, but part of the feature was missing when the team ran the application. Comparing reported completions with the surviving code exposed the discrepancy. A successful build had not established semantic completeness.

For teams sharing mutable state, the minimum control is optimistic locking. Each record has a version number, and a write succeeds only if that version matches the one the agent read. A mismatch requires the agent to re-read, reconsider its decision, and retry against the changed state.

For genuinely concurrent updates, event sourcing makes transitions immutable and exposes conflicts that would otherwise be resolved silently by recency. CRDTs can instead support inherently mergeable state, including task lists, feature flags, and presence data, although convergence does not establish domain correctness. The merge rule still needs careful design. LangGraph’s state-plus-reducer model handles updates within a graph, but it does not protect external files, database tables, or shared queues.

How CPython's free-threading transition widens the race window at the runtime level

PEP 703, “Making the Global Interpreter Lock Optional in CPython,” changes the synchronization assumptions beneath Python agent frameworks. The GIL historically serialized Python thread execution, implicitly protecting state that native extensions used through borrowed references, raw pointers, traversal state, and buffer leases. With free-threaded execution, those protections must be put in place explicitly. Even if a framework ran safely before the switch, its extensions may no longer be safe afterward.

The hazard involves a dependency as well as concurrent access. An operation establishes an owner–subject relationship and relies on a property of that relationship until a later use. Mutation, a reference drop, finalization, or Python re-entry can revoke the property during that interval. The owner remains alive, but the relationship is gone. Conventional race detectors and object-lifecycle checks can miss this distinction because neither necessarily connects the dependency to its later invalidation.

CONCURDEP recovers owner–subject–storage dependencies and connects them to invalidating events through an event-aware concurrency dependency graph. It then checks the protection required by each property. Evaluated against CPython 3.13–3.15, it identified 144 distinct root-cause bugs across free-threaded and conventional-GIL builds, including 95 previously unreported bugs. Re-entry contributes to the hazard as well as parallel execution. For agent teams adopting free-threading, the consequence is a changed runtime safety contract, with failures that can bypass Python exceptions and appear as native memory or interpreter-state corruption.

How dependency poisoning propagates through shared agent skill registries

A shared skill registry is also a shared authorization surface. A poisoned skill executes with the permissions available to its agent, potentially including terminal access, file-system access, and stored credentials. Its consequences therefore depend on more than package integrity. They depend on what the consuming agent is authorized to do.

ClosureBound describes why a signed root directory is insufficient to establish a skill’s operational identity. Recursive or lazy dependencies can change while the root’s signature or hash stays valid, so the agent can run a transitive closure that differs from the one that was authorized. The root passes, but the dependency set has drifted. Every agent resolving that changed closure is exposed to the same authorization gap.

The paper binds each grant to an exact closure root, effect ceiling, purpose, provenance, validity, and epochs. At operation time, the reference monitor re-resolves the closure and state, normalizes the external effect, and admits the operation only when the joint witness satisfies every bound. Paths that are equivalent must have the same effect limit. Otherwise, different code paths could have the same lasting effect without the same rules being applied to them as equivalent operations.

Version non-inheritance prevents a grant for version N from automatically authorizing version N+1. These guarantees depend on assumptions including complete mediation and discovery, authenticated freshness, and sound normalization. They do not establish remote-service honesty or program equivalence. Dependency updates must be treated as potential changes to authority as well as changes to executable content.

How the socket-reuse race in HTTP keep-alive turns shared network infrastructure into a state-corruption vector

Shared network connections introduce another way for valid-looking input to cross an execution boundary. Before an HTTP/1.1 keep-alive socket is reused, it should have a clean response boundary, but checking for unexpected data depends on event-loop I/O polling. Synchronous work can delay that check. A socket containing buffered response bytes from an earlier request can then be assigned to a new request, whose client parses those bytes as its response.

CVE-2026-105481 describes this response-ordering race in Node.js HTTP Agent keep-alive reuse. Disclosed in October 2026, it was fixed in Node.js 22.23.4, 24.22.1, and 26.12.1, and rated CVSS 3.0 6.5 with high integrity impact. Syntactically valid bytes conceal the incorrect association. If a response informs an identity decision, authorization check, resource address, or financial state, the consequences can extend from exposed data to an incorrect privileged action.

For shared agent runtimes, the concern is connection reuse across agent contexts or credential scopes. A response belonging to one session can become authoritative input to another. Public documentation retrieval has different consequences from control-plane decisions. While patching, teams can turn off keep-alive for sensitive destinations or use a separate Agent instance for each agent context. Request-correlation IDs and response-schema validation can help detect errors, but schema validity alone cannot prove that a response belongs to its request.

How noisy neighbor interference in shared compute degrades agent reliability in ways that look like model variance

Resource contention changes both what an agent can accomplish and how long it takes. Package installation, services, browsers, and disk writes consume CPU, memory, file descriptors, and network bandwidth. A runaway neighbor can alter the execution conditions mid-task. The same model and input can then produce different results because the tools available to the agent no longer behave the same way.

Memory pressure can cause the host OS to kill a process for lack of memory, while disk saturation can make package installation fail silently. Network saturation can produce tool-call timeouts that an agent misinterprets as service unavailability. Cancellation can also propagate across shared infrastructure. A timed-out operation that floods a shared connection pool with cancellation signals can turn local pressure into a fleet-wide retrieval outage.

These symptoms invite the same misdiagnosis as corrupted state. Engineers may change prompts or models when the changing variable is the compute environment. Host-level saturation alone does not show which agent caused it. ClosureBound’s effect-governance model applies here because installing packages or creating subprocesses should not let an agent use more compute than its authorized allowance.

The Cloud Native Computing Foundation’s 2026 agentic standards paper recommends agent-level retries, circuit breakers, and graceful degradation for agent communication and tool interactions. Those controls help prevent failures from cascading. They do not remove the resource contention that triggered the failure.

What isolation architecture actually contains these failures — and what it does not

For teams choosing how to run agents safely, the decision starts with the boundary being enforced. MicroVM isolation gives each agent its own kernel rather than the shared kernel exposed by standard Docker containers. That separates guest-level process, memory, and file-descriptor failures. The useful distinction is between containing execution and coordinating shared resources, because a VM boundary does not itself govern every service the guest uses.

Application-layer races remain intact across isolated VMs. Two agents can still overwrite a shared database record, retrieve inconsistent vector-store chunks, or resolve a poisoned dependency from the same registry. Separate kernels do not serialize those operations. Shared file-system mounts and credential stores likewise reintroduce channels across otherwise isolated runs.

Harness sandboxes provide different boundaries from hardware virtualization. Claude Code’s OS-level Bash sandbox uses Seatbelt or bubblewrap through Anthropic’s sandbox-runtime package, while git worktrees separately isolate parallel-session files and branches. Gemini CLI offers backends including Docker/Podman, gVisor, LXC, and native OS sandboxes. These mechanisms are not interchangeable with VM boundaries. Teams should assess execution isolation, file isolation, network restrictions, and approval policy as separate criteria.

Cato Networks’ DuneSlide disclosure illustrates the importance of the logic maintaining a sandbox. CVE-2026-50548 and CVE-2026-50549 involved prompt-injected commands manipulating working-directory and symlink-validation logic to overwrite Cursor’s sandbox helper. The kernel did not need to be broken. A boundary can be undermined by application logic that permits its own enforcement mechanism to be changed.

Credential and egress controls complete the containment decision. Secrets should stay outside the sandbox and be injected for each task only with explicit authorization, with no sharing across runs. An allowlist-based egress policy limits reachable destinations. Without that control, containing execution does not also contain data exfiltration by a poisoned dependency or prompt-injected agent.

What engineering teams need to instrument and enforce to operate safely across these failure classes

Teams need separate signals for state conflicts, dependency changes, and resource interference. Every shared-state write should include a version assertion, and version-mismatch retries should be visible as a first-class metric. As retries rise, they show that the state model is under pressure. For retrieval, chunk-level versioning or downstream consistency checks are needed when concurrent updates can produce a mixture of individually valid but collectively inconsistent chunks.

Dependency enforcement should bind grants to exact closure roots and re-resolve the transitive closure at operation time. Operations that go beyond the authorized effect ceiling should be rejected. Where full closure binding is impractical, teams should at minimum pin transitive dependencies and treat unpinned resolution as untrusted execution. A root-level integrity check is not a substitute.

Resource monitoring should attribute CPU, memory, disk I/O, and network use to each agent, with alerts on its resource envelope as well as host saturation. Network review should identify pools shared across contexts or credential scopes. Connection isolation keeps that exposure from crossing between contexts. Correlation IDs and schema checks help surface anomalies where shared pools remain.

Finally, every run should be attributable to a harness, model, credential, and task source. Per-run analytics must link resource use and execution outcomes to that context so investigators can tell whether a failure was isolated or came from shared infrastructure. Isolated VMs provide containment, while state controls, dependency governance, and attributable telemetry establish whether an agent’s result came from a trustworthy run.

Sources

  1. CONCURDEP: Event-Guided Analysis of Dependency Invalidation in CPython Concurrency
  2. Versioned Transitive Dependency-Closure Binding and Operation-Time Effect Governance for Agent Skills: ClosureBound
  3. Cloud native agentic standards

More in Cloud Agent Environments