arXiv:2610.03088cs.DCOct 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2610.03088

Coda: Exploiting Admission Flexibility for Coding-Agent Serving

Youhe Jiang, Fangcheng Fu, Binhang Yuan, Krishna Malladi, Ehsan K. Ardestani, Zhan Shu, Adnan Aziz, Yi Xu

Youhe Jiang

University of Cambridge

Ehsan K. Ardestani

Meta

Fangcheng Fu

SJTU

Zhan Shu

Meta

Binhang Yuan

HKUST

Adnan Aziz

Meta

Krishna Malladi

Meta

Yi Xu

Meta

Abstract

Coding agents powered by large language models (LLMs) repeatedly alternate between model inference and tool calls, creating long-lived sessions with reusable key-value (KV) states and asynchronous request resumptions. Logical readiness, however, does not ensure efficient admission in a shared serving system. Through direct trace analysis and trace-driven replay, we identify two mismatches: reusable KV states reside across storage tiers and incur unequal computational costs for state preparation, while requests with heterogeneous context lengths can decode inefficiently together. Our central insight is that exploiting admission flexibility can improve serving performance while preserving request progress.

We present CODA, a coding-agent serving system that realizes this insight through a readiness-informed admission layer incorporating two mechanisms. Tiered-Aging state admission exploits bounded flexibility in admission order to improve admission efficiency and preserve request progress. Compatibility-Aware execution admission exploits flexibility in attention grouping within each model iteration to reduce mixed-context interference and improve shared decoding efficiency. For multi-worker configurations, CODA introduces a separate routing layer that considers KV-state residency, worker load, and request-to-worker context-length compatibility to guide efficient request placement. We evaluate CODA across different models and workloads against state-of-the-art coding-agent serving systems and vLLM. Across the single-worker and multi-worker experiments, CODA improves output-token and SLO-compliant throughput by 20.3% and 70.5% on average, with peak gains of 29.3% and 140.2%.

1 Introduction

LLM coding agents extend software automation from code generation to multi-step development workflows, including repository-level repair, code editing, environment configuration, and test execution [3, 23, 26, 30]. Systems such as OpenAI Codex [17], Claude Code [1], and Cursor [5] support

Figure

Figure 1: Illustrative multi-session coding-agent workflows. Independent sessions alternate between model inference and tool execution. Tool calls return asynchronously, and their outputs extend subsequent model inputs, causing session contexts to grow at different rates.

these workflows through integrated model inference and tool execution. As Figure 1 illustrates, concurrent sessions repeatedly pause for tools, resume asynchronously, and accumulate context across model rounds [21, 24]. A request becomes logically ready when user input arrives or a tool return enables its session to continue. Logical readiness determines whether a request may proceed, but it does not determine whether that request should be prepared next or how efficiently it will share GPU execution with other ready requests. Admitting a request commits GPU resources and changes how other requests share those resources. Two characteristics of coding-agent workloads make this distinction particularly important.

First, readiness does not imply equal computational cost for preparation. Long-lived coding-agent sessions accumulate reusable interaction histories across successive model and tool invocations. Preserving the KV cache avoids repeated prefix computation, but the aggregate KV state of concurrent sessions can exceed available GPU high-bandwidth memory (HBM) capacity, motivating storage across HBM, CPU DRAM, and lower storage tiers [16, 18]. During tool-induced idle periods, memory pressure may evict a session's KV state from HBM before its next request becomes ready [12, 21, 24].

Consequently, equally ready requests can require substantially different preparation: one may reuse HBM-resident state, whereas another requires restoration, storage access, or prefix recomputation. In our trace-driven replay ( §3§3), 24.45% of resumed requests are not HBM-ready but account for 42.45% of total startup computational cost. Admission based on arrival order or reusable-prefix availability alone can therefore allow computationally expensive state preparation to delay several computationally inexpensive session continuations.

Second, readiness does not imply efficient shared execution. Long-lived coding-agent sessions accumulate context at different rates, while asynchronous tool returns bring sessions at different stages back into execution [21, 30]. Consequently, short-context requests frequently execute alongside requests with substantially larger KV states. Although each request is ready to proceed, heterogeneous context lengths can reduce attention-kernel efficiency during shared decoding [2]. In our trace-driven replay ( §3§3), 82.84% of multi-request decode iterations have a largest-to-smallest context-length ratio of at least 4×4\times. For pure-decode iterations, at fixed request count and total context-token volume, the observed context composition incurs a 25.95% higher median computational cost per iteration than a near-uniform composition. Admission based only on individual readiness can therefore create a heterogeneous active population; treating that population as a single attention group leaves context-length compatibility unaddressed.

Exploiting these opportunities is challenging. Prioritizing requests with low computational costs of state preparation can reduce blocking, but may repeatedly bypass sessions whose KV states reside in lower tiers. Conversely, strict ready-time order prevents reordering-based bypass but sacrifices this efficiency opportunity. Similarly, organizing heterogeneous contexts into separate attention groups can improve attention efficiency, but additional launches and smaller groups may outweigh the benefit; this tradeoff must be assessed online as the active population changes. In multi-worker configurations, context-compatible placement can also conflict with KV affinity and load balance.

Logical readiness should determine eligibility, but not admission order or execution grouping. Our approach exploits bounded flexibility between readiness and execution to reorder state preparation and reorganize attention groups.

In this paper, admission is twofold: state admission determines which logically ready request is prepared next, while execution admission determines how the current participating requests are organized for execution. These two decisions expose flexibility in admission order and execution grouping:

Flexibility in admission order. Admission can account for differences in the computational costs of KV-state preparation when selecting which logically ready request is prepared next. Bounded reordering can improve admission efficiency while guarding against indefinite bypass.

Flexibility in execution grouping. Admission can account for context-length compatibility when organizing the participating requests for attention execution. Compatibility-aware grouping can improve shared decoding efficiency when its computational savings exceed the computational cost of additional execution groups.

Existing systems improve coding-agent serving through cache management, session placement, and resource coordination. CacheWise combines prefix-aware scheduling based on additional KV-block demand with predictive KV-cache eviction informed by tool calls [21]. SMetric uses session reuse and worker load to guide request routing [22], while MORI manages GPU and CPU residency through relative program idleness and tier admission [24]. AlignedServe instead forms batches from waiting requests with similar KV-cache lengths [2]. Existing systems therefore address individual aspects of residency, placement, or context-aware batching, but do not jointly provide bounded preparation-aware ordering and within-iteration attention grouping for asynchronously resuming coding-agent sessions.

We present CODA, a coding-agent serving system that decouples logical readiness from physical GPU execution through a readiness-informed admission layer. Tiered-Aging state admission realizes bounded admission-order flexibility by combining the computational cost of KV-state preparation, waiting age, and a progress guard. Compatibility-Aware execution admission realizes execution-grouping flexibility by applying context-compatible attention groups only when conservative predicted computational savings exceed their additional computational overhead. For multi-worker configurations, a separate routing layer considers context-length compatibility only within KV-affinity and load safeguards. Our contributions are summarized as follows:

Contribution 1: We characterize coding-agent workloads through direct trace analysis and replay ( §3§3). We examine how changing KV-state residency creates unequal computational costs for state preparation, and how uneven context growth and tool returns create heterogeneous decode contexts. These findings show why logical readiness alone is insufficient and motivate flexible admission order and execution grouping.

Contribution 2: We design and implement CODA with two admission mechanisms ( §4§4): Tiered-Aging state admission ( §4.2§4.2) and Compatibility-Aware execution admission ( §4.3§4.3). A complementary routing layer supports multi-worker configurations ( §5§5). We integrate these mechanisms as an orchestration layer connected to the inference backend ( §6§6).

Contribution 3: We evaluate CODA across models and workloads in single-worker and multi-worker configurations ( §7§7). Compared with state-of-the-art coding-agent serving systems and a vLLM baseline, CODA improves single-worker output-token throughput by 17.5% on average and up to 23.9%, and SLO-compliant throughput by 96.1% on average and up to 140.2%. In the multi-worker experiments, output-token

Figure

Figure 2: Illustrative example of multi-tier KV storage. Lower tiers provide larger storage capacity. HBM-resident KV is directly accessible for decoding, whereas DRAM-resident KV requires GPU restoration and SSD-resident KV first requires loading into DRAM.

throughput improves by 23.1% on average and up to 29.3%, while SLO-compliant throughput improves by 45.0% on average and up to 59.0%. Component ablations and runtime analysis further identify the contributions of Tiered-Aging state admission, Compatibility-Aware execution admission, and routing to serving performance.

References (24)