Manuscript Offprint

arXiv:2610.06212

Serve Now or Improve Later? Scheduling Self-Evolution in Online Agent Systems

Yangbo Wei, Junhong Qian, Zhen Huang, Zhenyu Su, Qifan Wang, Shaoqiang Lu, Rumin Zhang, Chen Wu, Lei He

Abstract

Online agents can improve future service by constructing reusable tools, guidance, or model states, but this work competes with current requests for the same GPUs. Exploiting idle compute for self-evolution faces a fundamental systems constraint: benefits arrive only after an artifact is published and used, while pausing evolution leaves service capacity waiting for memory release and runtime recovery. An investment worth completing may therefore be worth postponing. We present LearnSched, a state-aware scheduler that brings the reuse window of a capability and the timely return of compute into a common investment model. LearnSched incorporates candidate progress, checkpoint overhead, and the current recovery path into action values. Under the same information and capacity constraints, it uses one-step counterfactual rollout to choose progress, checkpointing, or waiting relative to a fully costed window policy. We characterize handoff costs through independent A100 component measurements and evaluate action selection in 1920 paired finite-model scenarios. When cold recovery is expensive, waiting for longer execution windows can improve net value by avoiding handoffs; in evaluated warm-recovery scenarios, the strong window policy already achieves the same value. Retaining recoverable state can shorten capacity return and reduce the need for complex evolution scheduling.

Keywords: online agents, self-evolution, resource scheduling, compute investment, capacity readiness, preemption

1 Introduction

An online coding agent repeatedly fails on the same class of requests. It can continue invoking a model for each request, or use prior trajectories to construct a reusable tool or guidance, validate it, and publish it for later use. Persistent demand can repay this investment through fewer model calls and better answers; short-lived demand may leave even a qualified artifact unused. When service and evolution share GPUs, construction also consumes compute and memory needed by current requests. The system must decide: should the next unit of compute serve now or improve later?

Serve now or improve later?

Figure

When is future improvement worth the cost today?

Figure 1. Serving and self-evolution compete for shared GPU capacity. LoRA adaptation illustrates the tradeoff: invest in future capability while returning compute in time to meet current request deadlines.

Figure 1 illustrates this choice through LoRA adaptation: improving the model incurs training and recovery costs before future requests can benefit.

This decision couples two timescales. Foreground requests consume resources under latency deadlines, while capability construction incurs costs now for benefits spread across future requests. A useful artifact can reduce service work, but only after qualification, publication, and actual use. Its benefit cannot compensate for requests that have already missed their deadlines. The scheduling problem therefore involves both the value of the investment and the service capacity available along its execution path.

Running evolution during idle periods and pausing it at the next burst is a natural starting point. Yet an idle interval has two distinct boundaries: the latest start that leaves enough reuse to amortize construction, and the latest return that restores capacity before service needs it. A pause command may leave device memory occupied; releasing memory may still leave a serving runtime to reconstruct. Stopping evolution, reclaiming memory, and making capacity ready to serve are distinct system events. Treating the end of background computation as the return of service capacity overstates the useful part of an execution window.

(a) Capacity cliff

Figure

48 runs · 3-seed strips

(b) State-dependent return

Figure

(c) Cost reversal

Figure

Figure 2. Three investment constraints: (a) bad-request rates across four systems and four shares (three repeats; SG/vL: SGLang/vLLM); (b) cold/warm readiness means and min-max, with host PSS and GPU residency separate; (c) token and GPU cost ratios to no evolution, across four paired blocks. GPU activity excludes CPU costs.

Runtime state connects these boundaries. Termination discards unsaved progress, checkpointing consumes time, and retaining service state trades memory for faster recovery. Consider a short idle window followed by one long enough to complete construction. Immediate progress can publish the artifact slightly earlier but incur an extra checkpoint and cold recovery. Waiting pays when the avoided handoff costs exceed the benefits lost to delay. Cheap warm recovery can reverse this choice without changing the candidate or future demand. Thus, an investment worth completing need not be worth starting now.

Expected future benefits have long guided adaptive compilation [2], inference and retraining allocation [4, 11], and agent learning during idle windows [21]. Evolution control planes also incorporate cost signals [24]. We study the interaction between this investment perspective and the runtime mechanisms that preserve progress and restore service. With the same candidate, information, and execution mechanisms, when do durable progress and recovery costs change the best execution plan? Answering this question requires separating gains from better accounting, faster recovery, and different scheduling actions.

We present LearnSched, a state-aware scheduler that compares remaining benefits and execution costs under a capacity-return constraint. Its model connects the useful lifetime of a capability to completed and durable progress, current service state, and the recovery path. These quantities determine whether to advance, checkpoint and return, discard unsaved work, or wait. Execution components expose work pressure, publication and use, and capacity readiness to account for costs and benefits as they occur.

LearnSched uses classical one-step rollout [3] relative to Costed Window, a reference that fully prices a greedy completion plan. Both receive the same windows and recovery mechanisms. Comparing alternative continuations allows LearnSched to skip a costly short window or change execution segments when this improves value; retaining the reference action guarantees no loss in the accurate finite model. This formulation makes the added value of scheduling measurable against an already cost-aware reference.

Our evaluation separates independent A100 component measurements and capability ledgers from paired finite-model scheduling. Across 1920 scenarios, full cost accounting explains most of the benefit. Waiting adds value when cold recovery is expensive and longer windows lie ahead; all evaluated warm-recovery scenarios tie with Costed Window. The resulting systems implication is that state retention changes both return latency and the amount of value available to more complex planning. Runtime memory and investment policies thus require joint evaluation.

Our contributions are:

• A model connecting capability break-even conditions, durable progress, and state-dependent capacity return to explain when waiting improves net value.

• A scheduler that compares progress and waiting under common constraints, with finite-model policy improvement and an explicit scoring-error condition.

• Component measurements, capability ledgers, and paired evaluation isolating accounting and scheduling gains and their dependence on recovery state.

References (12)