Share this article:

This post is for anyone running self-evolving agent harnesses that grow to thousands of skills on self-hosted GPUs, and for Korean cloud and AI engineers setting up a new structure that decides which skill each task routes to. As the registry keeps growing, “put the full manifest in the LLM context and let it select directly, or stand up a hybrid router through BM25+embedding retrieval and LLM reranking” is still an open architecture decision. This paper prices that decision as a function of registry size N: up to what size is a router worth having, and below that, what does direct selection cost you.

The core result comes out in closed form on the declared nominal premises. Break-even is a region, not a point. The cost crossover N_cost, where the router gets cheaper than direct selection, is about 32 skills; the quality crossover N_qual, where it gets more accurate, is about 300; and the tipping registry N* = max(N_cost, N_qual) is about 300. At N=4, direct selection is 47% cheaper per task and 8 points more accurate; at N=2,029, the router is 35x cheaper and 69 points more accurate. What moves N* is the router stack’s own cost multiplier λ. Distilling the rerank stage to 8B drops λ from 1 to about 0.4 and collapses N_cost below the minimum registry size of 4. Quantizing the embedding stage to INT8 leaves N* barely moving. Because the registry grows every day, N is a trajectory rather than a sweep parameter; the optimal hysteresis band for switching architectures is about 18 skills, and the critical growth rate is about 0.8 skills/day. Building the router ahead of time below that costs 598~778 tasks worth of regret per year.

One thing to state before you read on. This is an analytical paper that counts values on the declared nominal premises, and it reports no new measurements. Every curve is a closed-form model prediction on the stated premises A1~A12, and a pre-registered sweep that pairs the two arms across the six grid points N=4…2,029 on 400 code-graded BFCL-simple tasks is designed to confirm or falsify those predictions. The three figures in the body are drawn by the analytical model, not measured data. If the previous papers in the series priced, in turn, the static break-even (a 3-arm cost-quality model on a fixed 2,029-skill registry plus a 63-case SRA audit), the rerank distillation frontier (8B student vs 27B teacher, the LLM half at 71.6% of the routing bill), and the embedding quantization tolerance (INT8 ranking safety margin), this paper is the explicit upgrade that lifts those three results onto one axis: registry size N.

Problem: “Should We Build a Router” Upgrades to “How Many, and When Do We Switch”

An unattended agent harness is, at its core, a routing problem. Every incoming task has to pick one skill from a registry of N, and that decision sits on the hot path of every request. Two architectures compete. The first is direct selection: putting the full manifest, skill names, descriptions, and parameter schemas, into the LLM context and letting the model emit the tool call. The second is hybrid retrieval routing: indexing the registry with BM25 and dense embeddings, picking a shortlist of k_r=20 per query, compressing it to a final window of k=5 with a single LLM rerank pass, and then choosing from there. The router is not free. Registry embedding, per-query retrieval, and reranking all spend tokens, and on self-hosted serving every one of those tokens is H200 compute time.

Registry size is no longer an implementation detail. ThakiCloud’s production harness evaluation registry has 2,029 skills, and the production registry has already grown to 2,295. Skills are added from successful trajectories, quietly modified, gated, and retired. External tool-use systems report the same shape: exposing the full registry of hundreds to tens of thousands of tools is expensive in tokens, and selection blurs as the registry grows. Yet every router evaluation published in the last two years fixes the registry at one size and optimizes only the inside of the router. Index structures, candidate width, rerank confidence and safety. Nothing has price-compared the router against the no-router alternative, direct selection. The question this paper counts is upstream of that: up to which registry size is a router worth having, and below that, what does direct selection cost.

Design: A Closed-Form Cost-Quality Model on Both Arms

The stage is a 27B-class LLM on self-hosted H200. Each skill carries a d-token manifest entry, with a nominal mean of d=50. Prices are in compute units per token: uncached input p_u, prefix-cache-hit input εp_u(ε=0.10), and output γp_u(γ=3.0). The mean price p̄( h) = ε + (1−ε)(1−h) opens over h, the probability that a static prefix stays in the cache. Direct selection has a static manifest, so h_D=0.80(p̄=0.28); the router’s shortlist changes per task, so h_R=0.50(p̄=0.55).

The cost curves open in closed form here. Direct selection runs c_D(N) = (f + N·d)·p̄( h_D) + o·γ = 380 + 14N per task, rising linearly in the registry. The router runs c_R(N) = λ[(c_q + k_r·d)·p̄( h_R) + o·γ] + N·d·c_emb/Q_r ≒ 825, nearly flat in N. What forms the floor of the cost is not the manifest but the router’s own overhead: the shortlist prompt and the rerank call. λ is the self-cost multiplier of the distilled or quantized router stages, packing the two compression results of the previous series into a single number.

The quality side gets two factors each. For direct selection: (a) not confusing the gold skill with a near-duplicate distractor, and (b) reading out the correct item from a lengthening list. P_D(N) = [1−βρ(N−1)]_+ / (1+(N·d/L_eff)²), with confusion risk βρ=10⁻⁴/item and read-out loss L_eff=64k from long-context position decay. The router is the probability R_1(N) = min(1, κ·N^−θ)(κ=400, θ=0.6) that the gold skill lands in the shortlist, plus selection accuracy inside and outside the rerank window, r_in=0.92, r_out=0.05, giving P_R(N) = (r_in−r_out)·R_1(N) + r_out. Recall decay is sublinear, so it saturates out to N≲22k in this range and P_R is flat at 92%. The common-factor assumption that task difficulty multiplies both arms equally is a condition the paired sweep below enforces.

Result 1: There Are Two Crossovers, and Break-even Is a Region

Both cost curves are linear in N, so the root of their difference comes out in closed form. N_cost(λ) = {λ[(c_q+k_r·d)·p̄( h_R) + o·γ] − f·p̄( h_D) − o·γ} / {d[p̄( h_D) − c_emb/Q_r]}, about 32 at the nominal point. For N < 32, the router’s own overhead cannot beat the manifest savings, so direct selection is cheaper. For N > 32, the router gets cheaper. Once λ is small enough, N_cost < 4, meaning the router is cheaper at every registry size we handle.

Per-task cost of direct selection vs hybrid router over registry size Per-task cost (in p_u units) over registry size N. Direct selection c_D(N) rises linearly in N (436 @ N=4, 28,786 @ N=2,029). The hybrid router c_R(N) is nearly flat at its own overhead floor (≒825). The two curves cross around the cost crossover N_cost ≒ 32 skills. Analytical model prediction, not measured data.

The quality crossover is about 300, and it is unique. Direct selection falls slowly, 100.0% at N=4, 99.8% at 16, 99.1% at 64, then quickly, 93.7% at 256, 54.7% at 1,024, 22.7% at 2,029. The router is flat at 92% across this range, because recall is saturated and, below N_qual, the router’s quality loss is only the fixed rerank imperfection 1−r_in. For N < 300, direct selection is more accurate; between 32 < N < 300, the router is cheaper but less accurate. That is the trade-off band. At N=64, direct selection buys 7.1 points of accuracy at 1.5x the cost of the router. The tipping registry N* = max(N_cost, N_qual) is about 300 at the nominal point, and below it, direct selection is the frontier arm on both cost and accuracy.

Success probability of direct selection vs hybrid router over registry size Per-task success probability over registry size N. Direct selection P_D(N) falls from 100% to 22.7% at N=2,029 under near-duplicate confusion and the read-out loss of long-context position decay, while the hybrid router P_R(N) is flat at the fixed rerank window quality of 92%. The two curves cross around the quality crossover N_qual ≒ 300 skills. Analytical model prediction, not measured data.

Result 2: The Levers Are Asymmetric. Rerank Distillation Removes the Band, Embedding Quantization Does Not Move N*

Sweeping λ from 0.3 to 1.2, the tipping registry is always pinned by the quality crossover N_qual, somewhere between 292 and 324, barely moving. What moves is the cost crossover N_cost: about 44 at λ=1.2, swept down to 4 or below at λ≤0.5. Setting the two compression levers the previous series priced against this, the ones that act on N* separate from the ones that do not.

Rerank-stage distillation is the 8B student cutting λ from 1 to about 0.4 at the same window quality. The previous paper Apprentice Reranker found the LLM half at 71.6% of the routing bill; distillation cuts that stage to less than half. The effect is asymmetric. N_cost collapses below the minimum registry size of 4, and N_qual shifts by only about 20 skills, a quality-preserving loss, to roughly 320. The trade-off band disappears. At every N ≥ 4, the router is cheaper and the accuracy loss is at most 1 point.

INT8 quantization of the embedding stage is different. The embedding path is negligible in c_R, so N_cost does not move; the ranking safety margin and retrieval category degradation lower r_in slightly, shifting N_qual by only a few items. N* barely budges. Embedding quantization is architecture-neutral: you do not buy it for the routing decision, you buy it for serving economics. You do not buy compression levers for a point; you buy them for a band.

Tipping region: cost and quality crossovers as functions of router-stack cost multiplier Cost crossover N_cost(λ) and quality crossover N_qual(λ) plotted as functions of the router stack cost multiplier λ. The quality crossover pins the tipping registry N across the full λ range (0.3~1.2) (about 324 @ λ=0.3, about 292 @ λ=1.2), and as the rerank stage is distilled and λ drops, the cost crossover collapses below the minimum registry size of 4. The band between the two curves is the trade-off region where the router is cheaper but less accurate. Analytical model prediction, not measured data.*

Dynamics: The Registry Grows, So N Is a Trajectory

In a self-evolving harness, registry size is a trajectory, N(t) = N_0 + g·t, with net growth of g skills/day, not a sweep parameter. Enter the daily-sync churn standard deviation σ_d=6 skills, the one-time cost S of an architecture switch, and regret of v=0.25 tasks per day per accuracy point on failed unattended tasks. S is one reindexing (N·d·c_emb) plus one cold warm-pass over the manifest, about 5.1 tasks worth at N=300.

The critical growth rate comes out in closed form. At horizon T=365 days, g_crit = (N*−N_0)/T ≒ 0.8 skills/day. Below it, the regret of staying on direct selection across the whole horizon is zero. Conversely, building the router ahead of time layers the accuracy-gap integral on top of S, costing 598~778 tasks worth of regret per year for g∈[0.1, 0.5]. The ranking of the three policies changes with each growth rate: always-direct P_D, always-router P_R, switch-at-the-tipping P_H(W). For g ≤ 0.5, P_H and P_D tie at zero regret while P_R produces 598~778. For g ≥ 1, P_H’s regret is capped by the switch cost S and the in-band cost, coming in at 102 for g=1, 53 for g=2, and 29 for g=4. P_D’s regret explodes to 381 at g=1, 2,366 at g=2, and 6,313 at g=4, and above g_crit the switch policy dominates both static policies.

In a band with churn, you do not switch all at once; you install a hysteresis band. Minimizing churn-regret over the sum of the probability that a daily sync crosses the band edge and the in-band cost gives W* ≒ 18 skills, nominally with σ_d=6, S=5.1, and μ=0.017 tasks worth/item. Annual churn regret is about 60 tasks worth, on the order of 2.5% of P_D’s regret at g=2. The operating rules are three lines. A small registry that starts below N_cost starts on direct selection, because it is cheaper and more accurate. Do not build the router ahead of time; install hysteresis monitoring on the band [N−W, N+W] ≒ [282, 318]. Below g_crit the expected cost of waiting is zero; above it, it is capped by S. Router compression is not bought for a point but for a band. Rerank distillation removes the band and makes early installation safe, while embedding quantization does not move N* and is handed to serving economics.

Pre-Registered Sweep: 6 Grid Points, 4 Falsification Conditions

The model is falsified by the following paired sweep. Tasks are the 400 code-graded BFCL-simple set, identical across both arms. The registry is stratified subsampling of the 2,029 production skills by SRA strata (skill density, gold type, language alignment) into six grid points N∈{4, 16, 64, 256, 1024, 2029}. Each grid point becomes the same task distribution at a different registry size. Arm D is direct selection over the full subsampled manifest; arm R is the live hybrid router (BM25+dense, k_r=20, k=5) restricted to the same subsample. The model is the 27B teacher on self-hosted H200 for both arms, with INT8 embedding-stack and 8B distilled-rerank-stack variants entering for F4. Billing is deterministic token billing computed from the prompt text, with cached and uncached input accounted separately. Each task runs alternately on both arms within the same session stream, so common factors cancel.

There are four falsification conditions. F1: the measured cost crossover lands outside N_cost ±30%, i.e. [22, 41]. F2: the measured accuracy crossover lands outside N_qual ±15%, i.e. [255, 345]. F3: P_D is non-monotonic above N≥128, or P_D(2029) > 50%. F4: the INT8 embedding stack moves the measured N* by more than +15% (falsifying the architecture-neutrality of embedding quantization), or the distilled rerank stack leaves the measured N_cost at 16 or more (falsifying band collapse). The report covers the paired per-task accuracy and cost curves at the six grid points, stratum-wise bootstrap confidence intervals, stratum-wise cost-quality frontiers, and the λ shift of F4; the analysis plan is published before execution, and the arms are not retuned on the evaluation set.

Where It Touches Company, Society, and Science

What ThakiCloud gets is lifting registry size into an explicit architecture decision with numbers attached. N* ≒ 300, g_crit ≒ 0.8 skills/day, W* ≒ 18, switch cost S ≒ 5 tasks worth. A new skill ecosystem starting from a few dozen skills starts on direct selection without a router. It does not stand up a router that is more expensive for N < N_cost and less accurate for N < N_qual. Instead it budgets one switch inside the monitoring band. The 2,029-skill production registry sits deep in the model’s router-dominance region; F1~F3 check whether standing on it was always the right call, and F4 tests whether the compression levers that have been pulled all along would have rewritten the history of that choice.

What society gets is the removal of permanent overhead. Platforms that default small registries to retrieval routing pay a shortlist prompt, a rerank call, and an index on every task, buying quality they do not need yet. The trade-off band (N_cost, N_qual) is where that overhead buys accuracy; below N_cost it buys higher cost and lower accuracy. In long-running automation ecosystems that will never exceed 300 skills, direct selection is the cheaper and more accurate architecture. The savings compound on every task.

What remains for science is the first cost-quality scaling curve comparing direct LLM tool selection and hybrid retrieval routing under controlled conditions along the registry-size axis. Existing tool-use literature benchmarks routers on fixed large registries, silently assuming the router’s existence. This paper lifts break-even into a region, N*(λ), a function of (N, λ). It gives a closed-form cost boundary (the cost crossover), a unique quality boundary (the quality crossover), and a dynamics layer applicable to a growing registry (critical growth rate, optimal hysteresis band, policy regret). Every prediction is mapped to a falsification condition.

Limits: Four Premises Hold the Curves, and There Is One Honest Caveat

First, single tool-call tasks. BFCL-simple is code-graded singleton tasks, so multi-target requests change both the recall and cost frontiers. Second, homogeneous item cost. d=50 is a protocol constant; heterogeneous manifests replace N·d with Σ_i d_i and move N_cost multiplicatively. Third, a first-order churn model. It keeps the daily sync as a Gaussian step; a long-range regime shift in prefix-cache serving could move the effective ε and therefore both crossovers. Fourth, the success value v=0.25 is conservative, but the policy ranking is robust to v∈[0.05, 1.0] at g=1, and the switch policy stays within 9% of the v-free cost.

The honest caveat is that every curve is model-derived. The quality ansatz [1−βρ(N−1)]_+ / (1+(N·d/L_eff)²) is parametric, and I do not claim the exponents are structural. Recall saturation κ·N^−θ may be optimistic for multi-tool tasks, and d=50 is a protocol constant. That is why the pre-registered sweep exists.

The paper text and accompanying materials are on the Hugging Face paper page. https://huggingface.co/datasets/thaki-AI/daily-paper-2026-11-30-direct-selection-vs-router-break-even

Every number in the body is either a closed-form prediction on the declared nominal premises A1~A12 or a result attributed to the cited literature; in that sense, this paper reports no new measurements. The precise closed-form values are: c_D(N) = 380 + 14N(436 @ N=4, 28,786 @ N=2,029), c_R(N) ≒ 825(827 @ N=2,029), N_cost ≒ 32(44 at λ=1.2, <4 at λ≤0.5), N_qual ≒ 300(292~324 for λ∈[0.3, 1.2]), N ≒ 300, P_D: 100.0 → 99.8 → 99.1 → 93.7 → 54.7 → 22.7(N=4, 16, 64, 256, 1024, 2029), P_R = 92.0 flat, direct selection 47% cheaper and 8 points more accurate at N=4, the router 35x cheaper and 69 points more accurate at N=2,029, direct selection buying 7.1 points at 1.5x cost at N=64, λ = 0.4(8B distilled rerank, LLM half at 71.6% of the routing bill), N_qual shifting only about 20 to ≒ 320 under distillation, S ≒ 5.1 tasks worth(N=300), g_crit ≒ 0.8 skills/day, pre-build regret 598~778 tasks worth/year(g∈[0.1, 0.5]), W* ≒ 18 skills(annual churn regret ≒ 60, 2.5% of P_D regret at g=2), P_D regret 381/2,366/6,313 @ g=1/2/4, P_H regret 102/53/29 @ g=1/2/4, falsification bands F1 [22, 41], F2 [255, 345], F3 P_D non-monotonic above N≥128 or P_D(2029) > 50%, F4 N* shift beyond +15% or N_cost up to ≥ 16. The three figures are closed-form computations of the analytical model, not measured data. The six-grid-point paired sweep is pre-registered and was not executed in this paper; measured values will be reported at the time of execution.*

Share this article:

Tags: agent-harness, bfcl-tool-calling, bm25-embedding-retrieval, cost-quality-frontier, direct-llm-tool-calling, h200-serving, hybrid-skill-routing, registry-size-break-even, routing-overhead, sra-bench, tool-selection-scaling

Categories:

Updated: