TideSand: Performance-Accurate Sandbox Multiplexing for LLM Agents

Shulu Li, Hanchen Li, Xiaokun Chen, Qiuyang Mang, Hanfei Chen, Jacky Kwok, Hanfei Yu, Alvin Cheung, Edward A. Lee, Joseph E. Gonzalez, Ion StoicaarXiv 2026

As Large Language Model (LLM) agents evolve from simple chatbots into "auto-researchers" that can write code, run experiments, and optimize systems, they need more than just a prompt—they need a sandbox. These isolated execution environments are where the real work happens, but they come with a hidden, ballooning cost.

TL;DR

LLM agents spend a massive amount of time "thinking" (inference) while their expensive execution environments (sandboxes) sit idle, wasting resources. TideSand is a new system that intelligently shares these resources between multiple agents without sacrificing "tool-call fidelity"—ensuring that when an agent runs a performance test, the results aren't skewed by other agents hogging the CPU.

What Problem Does This Paper Address?

We are living through a strange economic shift in AI: while the cost of LLM tokens is plummeting, the cost of the "boring" stuff—CPU and RAM for execution—remains stubbornly flat.

Figure 1. Equal-Intelligence LLM Token prices plummet while CPU sandboxes cost stay relatively flat over the last year.

When an agent performs a task, it follows a loop: think, act, observe. During the "think" phase (inference), the sandbox is essentially a ghost town, yet it stays allocated and paid for. If you try to save money by "overcommitting" (cramming too many sandboxes onto one machine), you run into resource contention.

For a general-purpose agent, a little lag might not matter. But for an "auto-research" agent trying to optimize a database or measure code performance, a 10% slowdown caused by a neighbor's sandbox isn't just an annoyance—it’s a data corruption event. The authors call this tool-call fidelity: the ability of a sandbox to preserve the exact execution times and results of a tool call.

Figure 2. End-to-end agent cost breakdown across models at max effort for Terminal-Bench 4.0, excluding GPU tasks

Methods

TideSand introduces a "control plane" that sits between the agent and the host machine. It uses three clever tricks to maximize efficiency while protecting fidelity:

  1. Agent-aware Scheduling: TideSand uses an LLM proxy to "peek" at the model's output. If it sees a tool call coming, it checks if the machine has enough "headroom" (CPU/RAM) to run it accurately. If the machine is too busy, it slightly delays the response to the agent. Because agents are used to waiting for LLMs anyway, this queuing delay is invisible to the agent and doesn't affect the tool's internal timing.
  2. Speculative Swapping: When an agent enters a long inference phase, TideSand proactively moves its sandbox memory to disk (swap). Crucially, it uses the LLM proxy to detect when the agent is about to finish thinking and prefetches that memory back into RAM just in time for the next action.
  3. Selective Rollback: Sometimes, despite best efforts, resource demand spikes. TideSand can "checkpoint" a sandbox before a tool call. If the machine becomes saturated, it can kill a lower-priority sandbox, free up resources for others, and later "roll back" the killed sandbox to its pre-call state to try again when the machine is idle.

Datasets

The authors evaluated TideSand using three diverse benchmarks that represent the "heavy lifting" of modern agents:

  • AlgoTune: An auto-optimization benchmark where agents try to make code run faster. This is the ultimate test for performance fidelity.
  • Terminal-Bench 4.0: A collection of complex terminal-based tasks (software engineering, system admin).
  • Terminal-Bench Science: Data analysis and simulation tasks derived from real research papers.

Key Insights and Ideas

  • Inference Time is a Gift: The "thinking" time of an LLM is a predictable window of idleness. TideSand turns this waste into a buffer that allows for aggressive resource sharing.
  • Fidelity > Speed: In the world of automated research, a slow result is better than a wrong result. TideSand prioritizes keeping the execution environment "clean" over immediate execution.
  • Statistical Prediction Works: By looking at the last few tool calls an agent made, TideSand can surprisingly accurately predict how much CPU and memory the next call will need, allowing for much tighter scheduling than "strict reservation" ever could.

Key Results

TideSand proves you can have your cake and eat it too:

  • Throughput: It achieves 3.8–10× higher throughput than strict resource reservation. This means you can support ten times as many agents on the same hardware.
  • Fidelity: Compared to naive overcommitment (just cramming them in), TideSand provides 7–44% higher fidelity.
  • Real-World Impact: On the AlgoTune benchmark, TideSand reduced the agent's evaluation error by 19×. Because the timing measurements were accurate, the agents actually succeeded in optimizing the code rather than being misled by "noise" from other sandboxes.

Limitations and Future Work

While TideSand is a major step forward for CPU-based tasks, the authors note a few frontiers:

  • The GPU Gap: Currently, TideSand focuses on CPU and RAM. Extending this to GPU or TPU sandboxes (where agents might be training small models or running local inference) requires more complex state management.
  • Memory Bandwidth: Even with CPU isolation, "noisy neighbors" can still affect memory bandwidth. The authors suggest that better hardware-level isolation (like Intel RDT) could further improve fidelity.
  • Inference Co-design: There is an opportunity to link the sandbox scheduler directly with the LLM inference engine to perfectly sync memory swapping with token generation.

In short, TideSand is the "smart roommate" for LLM agents—making sure everyone shares the rent without anyone hogging the kitchen when it's time to cook.

Summary updated

Abstract

We propose TideSand, a sandbox system that intelligently multiplexes resources for performance-sensitive LLM agents, such as auto research agents working on system measurement tasks. TideSand combines three key ideas: agent-aware scheduling, which schedules sandbox execution intelligently at the tool call level to avoid resource contention; speculative swapping, which offloads the memory of sandboxes waiting on inference and restores it before their next tool call; and selective rollback, which checkpoints selected sandboxes when contention occurs and restores them when machines are idle. We evaluate TideSand across six model-workload pairs on AlgoTune, Terminal-Bench 4.0, and Terminal-Bench Science. TideSand achieves 3.8-10x higher throughput than strict reservation while maintaining tool-call fidelity, or 7-44% higher fidelity than overcommit baselines at similar throughput. Moreover, TideSand reduces the evaluation error on Algotune by 19x through improved tool-call fidelity. We hope the work motivates future research to maintain tool call fidelity while keeping resource utilization high through statistical multiplexing.
BibTeX
@misc{li2026tidesand,
  author = {Shulu Li and Hanchen Li and Xiaokun Chen and Qiuyang Mang and Hanfei Chen and Jacky Kwok and Hanfei Yu and Alvin Cheung and Edward A. Lee and Joseph E. Gonzalez and Ion Stoica},
  title = {{TideSand: Performance-Accurate Sandbox Multiplexing for LLM Agents}},
  year = {2026},
  eprint = {2611.31118},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31118},
}
Figure