arXiv:2611.05269cs.OSNov 2026

Manuscript Offprint

arXiv:2611.05269

ToolSched: Resource-Efficient Tool Scheduling for Shared-Host LLM Agents

Shucheng Zou, Yuhao Gu, Long Chen, Zhongchun Zheng, BinZe Xie, Xianwei Zhang

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

ABSTRACT

Local LLM agents often work on shared hosts. Unlike multi-tenant cloud clusters, these hosts often have tightly bounded memory, CPU, and I/O resources. Concurrent agents frequently suffer from resource contention, leading to failures such as OOM and reduced resource efficiency. Considering that agents' resource demands are bursty and shell command delay is imperceptible to agents, there is a huge scheduling opportunity to arrange when and in what order commands are actually executed. Thus, we present ToolSched, a Shell MCP Server for shared local hosts that serves multiple agents and schedules their operations. ToolSched embeds a resource model into the MCP interface: agents estimate resource demands along with command requests. These hints, together with real-time host resource conditions, determine when commands are actually executed. Internally, ToolSched applies a scheduling algorithm to stagger commands, reducing contention and improving resource utilization. Prediction correction and checkpoint-based recovery mitigate estimation bias and resource errors. Our evaluation on Terminal Bench shows that, compared with unscheduled execution, ToolSched improves resource utilization by 148.4% and end-to-end command throughput by 29.4%, demonstrating its effectiveness and practicality.

1 INTRODUCTION

Large language models (LLMs) have evolved from text generators into multi-turn chat bots (OpenAI, 2022), and are now entering the era of agents (Wang et al., 2024). Unlike previous LLM services that merely generated text, agents connect the thinking ability of LLMs with real-world operations (Yao et al., 2023): they call tools or execute commands to interact with environments, and iteratively revise their behavior to complete complex tasks. This capability enables agents to handle domains such as software engineering (Yang et al., 2024; Jimenez et al., 2024; Wang et al., 2025), data analysis (Chan et al., 2025; Hong et al., 2025), and scientific experimentation (Boiko et al., 2023), where success depends on continuous interaction with stateful execution environments. Nowadays, most ChatGPT-like chat applications already possess some agent capabilities (OpenAI, 2025). They run in the cloud, co-located with inference services, respond to remote users' dialogue requests, and call predefined tools during responses to improve their answers.

Another class of agents runs as standalone applications on local hosts, acting as a bridge between LLM inference services and real-world operational environments: they request external LLM inference services and translate the output tokens into concrete actions like editing files or executing shell commands on behalf of users, such as OpenClaw (OpenClaw Contributors, n.d.), Hermes (Nous Research, n.d.), etc. In such scenarios, it is common to see multiple agents work on the same host. As shown in Figure 1, a workgroup or a small team may share a server used jointly by all members and their agents. Unlike multi-tenant cloud clusters, the computational resources, such as memory, CPU, and disk I/O, are highly constrained. Contention among multiple agents often leads to execution failures due to resource insufficiency, i.e., out-of-memory (OOM) errors, as observed by Zheng et al. (2026).

Coordination among agents is demanded to alleviate this resource contention problem. Figure 1 demonstrates that the resource demands during a single agent task can fluctuate dramatically: memory, CPU, and I/O demands may differ by an order of magnitude or more across stages. On the other hand,

Figure

Figure 1: A group of team members may share a single host machine, along with their agents. The right part of the figure presents typical observations during a real task, where resource contention may arise due to highly dynamic resource demands.

since an LLM's inference output is only related to its input, from the agent's perspective, delaying the execution of a shell command is semantically indistinguishable from the command itself taking longer to execute. This presents a significant scheduling opportunity: by appropriately arranging the execution order and time of shell commands, we can coordinate resource usage among multiple agents without affecting the agents' final behavior, thus reducing contention, improving resource utilization, and ultimately increasing overall performance.

Driven by this idea, we propose ToolSched, a Shell MCP (Model Context Protocol Contributors, 2025) Server running on local shared hosts. ToolSched can serve multiple agents simultaneously and manage their associated Linux containers used for executing shell commands. Unlike previous Shell MCP Servers, ToolSched embeds a resource model into the MCP interface: it requires the agent to estimate the resource requirements when issuing an operation request. These hints, together with the host's real-time resource conditions, are used to decide when to actually execute the shell command. Internally, ToolSched applies a scheduling algorithm to achieve staggered execution, thereby reducing contention and improving host resource utilization. To mitigate estimation bias and overload challenges, ToolSched also introduces prediction correction and checkpoint-based recovery mechanisms to improve scheduling accuracy and system reliability.

In conclusion, the contributions of this paper are as follows:

  1. We propose that it is possible to apply proactive shell command scheduling to alleviate resource contention among LLM agents operating on a shared host, without changing the semantics of commands as visible to agents.

  2. We introduce ToolSched, a prototype Shell MCP Server that can coordinate multiple agents and, through real-time resource-aware scheduling, achieve accurate and reliable staggered execution of shell commands.

  3. Our evaluation on Terminal Bench (Merrill et al., 2026) shows that ToolSched can improve resource utilization by 148.4% and command throughput by 29.4%, compared with unscheduled execution, proving its effectiveness and practicability.