Share this article:

This post is for anyone who runs unattended agent loops all night on a self-hosted GPU fleet, and for Korean cloud and AI engineers who want to change the routing structure that decides which skill and which model tier runs each task but do not know how many alternatives there are. The agent picks a skill from a self-evolving registry of 2,200 skills and hands it to a serving tier. Today that choice runs through a static router in the fleet: a router whose configuration is fixed at deploy time and does not change until a human retunes it. This paper puts a price on what happens when the router starts learning from realized downstream outcomes.

The core result comes out on the declared rate card. The learning route reaches the parity band within the first overnight cycle, and at that point tokens per completed task, TCT, have fallen 43.4%, from 2,744.6 to 1,554.4. Final success drops 1.54 points to 0.9484 and stays inside the pre-registered 2-point parity band. Overnight spend falls 62.9%, from $2.248 to $0.834 per cycle. The convergence horizon is 32 episodes (6.7% of the cycle) under the declared class-gap reading and 229 episodes (47.7%) under the full-context reading.

One thing to state before you read on. This is an analytical paper that counts values on declared premises, and it reports no new measurements. Every number is either a closed-form prediction on the declared nominal rate card or a result attributed to the cited literature. The three figures in the body are schematics drawn by the analytical model and conceptual examples, not measured data. If the previous paper in the series, Indifference Band, priced the near-tie decisions inside the indifference band as a static expected-cost tiebreak, this paper is an explicit upgrade of that analysis. It converts that result, which the router had as a fixed object, into within-band seeding for the bandit policy, and moves from a static curve whose value is set once to a learning frontier whose value is re-set by outcomes.

Problem: Every Value Inside the Router Is Priced, and Only the Router Itself Does Not Learn

The routing series has priced the static hybrid router part by part. Thinking Router priced the inference budget between the routing stage and the execution stage, and Miss Price priced a single routing miss: the miss multiplier m, the recovery classes R = {S, F, E, N} and recovery rate rho, all the way up to the breakeven accuracy alpha*. Indifference Band priced the near-tie decisions inside the band as the expected-cost tiebreak CommitByCost(delta). The parts all carry prices. What does not move is the router. Its configuration is fixed at deploy time, and realized downstream outcomes never update the policy.

The external literature has the same shape. RouteLLM trains strong/weak routers offline on preference data, and FrugalGPT learns a cost-aware cascade order offline. The conformal line of work calibrates confidence thresholds but does not close the loop from outcomes. In all of these, the routing rule is fixed at deploy time. The closest external work, Skill Adapter, is online routing on a growing skill pool that uses routing outcomes as reward, but its objective is task success. The convergence horizon that a fleet would demand be priced is not characterized. This paper asks one question: if the action space stays identical to the static router, retrieval top-K x tier, and the learning signal is switched from retrieval ranking to downstream task outcomes, what changes?

Design: A Bandit Router in Which the Task Outcome Is the Reward

The stage is an overnight cycle of 480 episodes. In each episode, a task x_t arrives from a stationary class stream (easy:medium:hard = 0.40:0.35:0.25), and retrieval returns the top-5 skills from the 2,200-skill registry. The policy picks one of 15 arms (skill, tier), the product of those 5 skills and the 3 tiers. The tiers are the frontier (R1), hybrid (R2), and quantized (R3) serving configurations on a self-hosted H200. Execution returns a success or a miss, and tokens are metered at the declared per-tier prices. A miss is not necessarily the end. A fraction rho of the misses is completed later through post-hoc recovery, and the rework tokens of the work that stays incomplete are allocated to the completed tasks.

TCT enters the reward. Let the tokens an episode is expected to spend, rework included, be E = c_r + c_e x (p + (1-p) x m), and let the probability of eventual completion be p* = p + (1-p) x rho; TCT is then the ratio of the two, E/p*. Because the miss multiplier m and the recovery rate rho from Miss Price enter additively, what the bandit is trained on is not the retrieval ranking but the downstream cost defined by the miss-pricing analysis itself. The reward is observed every episode, so credit assignment over the (skill, tier) arms is well defined, and the objective is TCT minimization subject to the parity-band constraint.

The rate card declares execution tokens and prices per tier. Execution costs are 3,200 tokens for frontier, 2,400 for hybrid, and 900 for quantized; router costs are 1,100, 180, and 70 tokens. Prices are $4.427, $1.7708, and $0.664 per million tokens, consistent with the $2,040/night step-execution ledger declared by the series. Miss multipliers are 1.20 for frontier, 1.40 for hybrid, and 2.10 for quantized. That is a coupling in which the cheaper a tier is to execute, the worse the decoy it assembles from the candidate pool, so the cost per miss ends up higher.

The algorithm operates as a constrained contextual bandit. The context is the declared linearization of the retrieval scatter vector and the class features, taken as d = 32. In each episode, a UCB index is placed on a plug-in TCT estimator, and since the reward is a cost, the arm that minimizes the index is played. After the execution outcome, the arm counters, the success and recovery counters, and the aggregate p* are updated. An update that would push p* below the lower bound of the parity band is rejected, and the previous policy is re-executed: a delayed constraint projection. The initialization deserves attention. Exploration does not start from uniform noise but from the static analysis. Inside the indifference band, the CommitByCost(w=2) order becomes the within-band seeding, and the bandit tries the cheapest member of each class-tier cell first. It is a zero-overhead reordering of the same candidates, so the seeding spends no extra token in the routing stage.

Structure of the closed-loop bandit router versus the deployed static hybrid router. The learning edge that feeds realized outcomes, metered tokens, and recovery events back into the policy update is the only structural difference; the static baseline has no update edge. A schematic of the analytical model, not a measurement.

Result 1: The Convergence Horizon Is Inside the First Overnight Cycle

The convergence horizon T* is an upper bound on the number of episodes it takes for the aggregate mean TCT to first enter, and stay in, the region below the static baseline where quality is inside the parity band. The bound splits into two terms: a probabilistic gap-based term over the per-class tier arms, and an exploration budget term over the d-dimensional retrieval scatter context. On the declared rate card, the gap term evaluates in closed form to 31.4 episodes and the context term to 197.6 episodes.

The reading branches two ways. The gap reading interprets the task class as declared in the context, with the CommitByCost seeding removing most of the within-band exploration. Then E[T] is 31.4, roughly 32 episodes, 6.7% of the cycle. At the declared pacing of 480 episodes over 18 production hours, that converts to about 72 minutes. The context reading is the worst case in which the full d = 32 context is explored from scratch; E[T] is 229.0, roughly 229 episodes, 47.7% of the cycle. Under either reading, the learning route reaches the parity band within the first overnight cycle. The end-of-first-cycle aggregate TCT is also strictly below the static TCT of 2,744.6: at most 1,662.9 (-39.4%) under the gap reading and at most 2,354.6 (-14.2%) under the context reading. The gap between the two values is the price of not declaring the class, and the CommitByCost seeding is the declared mechanism that narrows it.

The shape of the aggregate TCT through the first 480-episode overnight cycle. Under both convergence readings, the learning route is predicted to reach the low-TCT plateau within a single cycle, and the declared class-gap reading converges much earlier. A conceptual example, not a measurement.

Result 2: Easy and Medium Move to quantized, Hard Stays on hybrid

The constrained-optimal policy pi_L is (R3, R3, R2). Easy and medium tasks drop to the quantized tier, and hard tasks stay on hybrid. What separates the drops is the closed-form tier swap test. A drop from tier r to a cheaper r’ is TCT-optimal only when E_{c,r’} x p_{c,r} < E_{c,r} x p_{c,r’}, that is, only when the raw TCT goes down. At the declared nominal values, easy and medium pass this test. Hard passes on raw TCT as well (1,346.2 x 0.898 < 2,743.2 x 0.772). What blocks that drop is not TCT but the parity-band constraint. Dropping hard too pushes the aggregate final success down to 0.9169, which falls 2.69 points below the band lower bound of 0.9438.

The aggregate predictions are as follows. TCT falls 43.4%, from 2,744.6 to 1,554.4. Final success drops 1.54 points, from 0.9638 to 0.9484, entering the pre-registered 2-point band. Tokens per episode shrink 44.3%, from 2,645.3 to 1,474.2, and completed tasks per cycle fall 1.6%, from 462.6 to 455.2. Overnight spend drops 62.9%, from $2.248 to $0.834, saving $1.414 per cycle, an amount that subsumes the Indifference Band’s Band-Two prediction of $60.5 per cycle under a different accounting basis.

Serving-tier assignment per task class. The static policy pins every class to hybrid, while the constrained-optimal learned policy drops easy and medium to quantized and keeps hard on hybrid, because dropping hard as well would push aggregate success below the pre-registered 2-point parity band. A schematic of the analytical model, not a measurement.

The post-horizon dominance theorem pins this result down. For all N >= T, with probability at least 1 - 2 x e^(-(N-T)/16), the aggregate TCT of the learning route stays strictly below the static TCT by at least 1,081.7 tokens (39.4% of the static value). And the static policy pi_0 is recovered inside the indifference band as the zero-exploration, greedy limit of pi_L. The result of Indifference Band is absorbed. Its tiebreak becomes the bandit’s within-band seeding, and the $60.5 per cycle prediction becomes the first-order term of the drops that leave the static configuration. The fleet operating rule is one line: turn the closed loop on once, and nobody retunes the router after that. For N < T* the static route is the cheaper operation (no exploration), and for N > T* the learning route is the cheaper operation. The cost-quality frontier moves up from a static curve whose value is set once to a learning frontier as a function of (delta, N), with a characterized entry time T*(delta).

Pre-registered Falsification Protocol: Four Arms, Five Criteria

The predictions of a paper with no new measurements must be auditable. The protocol is pre-registered on a shared SRA-bench stream with per-tier token metering on a self-hosted H200. There are four arms, and all of them run over the same case stream. B0 is the static hybrid pi_0, the current production default. B1 is the closed-loop bandit pi_L. B2 is the oracle stationary policy (R3, R3, R2) fixed at t = 0, the point B1 is predicted to converge to without learning. B3 is an exploration-only control arm that resamples the tier uniformly within the band every episode, separating exploration overhead from learning gain. The window statistics cover the first 100 episodes after the predicted horizon.

There are five falsification criteria, and when a criterion trips, what gets fixed is not the ledger but the mechanism that criterion names. F1: the window TCT of B1 exceeds the full TCT of B0 (2,744.6). F2: the window final success of B1 is at least 2 points below the full value of B0 (0.9638). F3: the realized horizon of B1 exceeds 2 cycles (960 episodes). F4: the steady-state TCT gap between B1 and B2 exceeds 25% of the predicted B0-B1 gap (297.6 tokens). F5: the window TCT of B3 exceeds the full TCT of B0. F1 means there is no learning gain, F2 means the parity band broke, and F3 means the horizon bound is falsified even under the context reading (229). F4 means the credit assignment, that is the reward of the miss-price and recovery terms, is miscalibrated, and F5 means the exploration overhead overtakes the static baseline and the within-band seeding is falsified. Each closed-form number maps to exactly one falsification statement.

Where It Touches: Company, Society, and Science

What the company gets is an adaptive router that lowers tokens per completed task for an unattended agent fleet, with no human retuning. It sits directly on top of the existing SRA-bench harness and token metering, and the exploration cost is bounded in advance by the horizon bound and the window statistics. The operating rule is one line: turn the closed loop on once, and at N > T* the learning route is the cheaper operation.

What society gets is a reduction in inference cost and energy per large-scale automated task. When the router learns the cheapest tier that is just enough from realized downstream outcomes, quantized digests the easy and medium tasks, and the tokens of the frontier tier are spent only on the hard tasks that truly need them. For the teams running self-hosted agent fleets, an operating point that holds the quality cost at 1.54 points and cuts overnight spend by 62.9% becomes a concrete operating rule inside the declared band.

What remains for science is the first characterization of a closed-loop contextual bandit skill router trained on downstream task outcomes. The earlier static frontier analysis fixed the routing configuration and drew the cost-quality curve, but it did not price the transition itself from the static policy to the learned one. This paper characterizes the convergence horizon and the per-completion cost of that transition, absorbs the Indifference Band’s static tiebreak as the bandit’s within-band seeding, and lifts the static frontier into a learning frontier with an entry time T*(delta).

Limits: Six Premises That Hold the Result

There are six limits. First, within-cycle stationarity. Because the registry is self-evolving, (A1) holds within one cycle by the construction of the overnight task stream. But skill-pool drift across cycles invalidates the learned posterior, and the declared remedy, the stale-observation discount, re-inflates T* with every drift. Second, declared miss economics. The miss multipliers m_r and the recovery rates rho_c enter as known constants. The bandit in this analysis does not estimate its own m and rho errors, so the breakeven sensitivity of Miss Price transfers into the reward as-is.

Third, the aggregate parity band. The constraint is cycle-level final success, not per-task SLOs. Adding per-task quality lower bounds shrinks the feasible set and lengthens T, and its limit is the strict parity point (R3, R2, R1), which saves only 9.6% of TCT while spending 43.5% more. Fourth, a single cost channel. The objective is token cost alone, and wall time, goodput, and energy are assumed proportional to the declared tier prices. SLO-aware routing is outside the declared ledger. Fifth, context sufficiency. If success is decided at a finer level than the declared retrieval scatter and class features, the gap reading underestimates T, and the context reading is the honest fallback. Sixth, exploration on live traffic. B1 explores on the real overnight stream, and a canary split q multiplies T* by 1/q instead of limiting live exposure to a fraction q.

The paper and its companion materials are viewable on the Hugging Face paper detail page. https://huggingface.co/datasets/thaki-AI/daily-paper-2026-11-26-closed-loop-bandit-skill-router-cost

Every number in the body is a closed-form prediction on the declared nominal rate card or a result attributed to the cited literature. In that sense, this paper reports no new measurements. The precise closed-form values: TCT from 2,744.6 to 1,554.4 (-43.4%), final success from 0.9638 to 0.9484 (-1.54 points), overnight spend from $2.248 to $0.834 (-62.9%), tokens per episode from 2,645.3 to 1,474.2, completed tasks from 462.6 to 455.2, T* <= 32 (gap reading) / <= 229 (context reading), end-of-first-cycle aggregate TCT <= 1,662.9 / <= 2,354.6, and a dominance margin of 1,081.7 tokens (39.4% of the static value). The three figures are schematics of the analytical model and conceptual examples, not measurements. The 4-arm (B0 to B3) x 5-criterion (F1 to F5) pre-registered protocol was not executed in this paper, and the reporting of measured values happens at execution time.

Share this article:

Tags: closed-loop-routing, contextual-bandit, convergence-horizon, cost-per-completed-task, downstream-outcome-reward, h200-serving, parity-band, skill-router, sra-bench, unattended-agent-loops

Categories:

Updated: