TL;DR
As LLM agent systems scale, managing large libraries of reusable tools and skills becomes a major bottleneck. This paper uncovers two coupled empirical scaling laws—governing tool selection (routing) and execution—revealing that routing accuracy decays logarithmically with library size due to predictable semantic confusion. By leveraging these laws, the authors build an automated skill manager that optimizes library structure, boosting agent routing accuracy from 71.3% to 91.7% and significantly improving downstream task execution.
What Problem Does This Paper Address?
When building advanced LLM agents, developers typically equip them with a library of reusable skills or tools (APIs, code snippets, or specialized functions). The natural assumption is that expanding this library makes the agent more capable. However, as these libraries grow into the hundreds or thousands of skills, agents increasingly struggle to select the right tool for the job.
Crucially, the authors find that the primary failure mode isn't ordinary hallucination (making up non-existent tools). Instead, agents suffer from in-library hijack: they stay within the library but select the wrong tool. This happens because larger libraries create denser neighborhoods of highly similar options, leading to local competition, cross-family drift, and eventual capture by overly general "black-hole skills." This paper provides the first rigorous empirical characterization of these scaling dynamics.
Methods
The authors systematically evaluated 15 frontier LLMs (including GPT-5 variants, Claude 4.6 variants, Gemini 3.1, DeepSeek-V4 Pro, and Qwen3) across more than 3 million routing and execution decisions.
They formalize two primary empirical laws:
-
The Routing Law: Single-step tool selection accuracy follows a strict logarithmic decay relative to library size ($N$): $$Acc(N) = a - b \ln N$$ Here, $b$ represents the model-specific decay slope. A larger $b$ means a model's accuracy collapses faster as the library grows.
-
The Execution Law: Multi-step routing without intermediate state realization compounds errors multiplicatively. However, once a tool is successfully executed, the resulting concrete state provides a "rescue effect," drastically clarifying the context for subsequent downstream decisions.
Using these insights, they developed a Law-Guided Auto Skill Manager. Instead of modifying the LLM prompt or retraining the model, this system optimizes the geometry of the library itself by auditing nearest neighbors, rewriting confusing description boundaries, removing abstract "black-hole" attractors, and anchoring prompts with concrete task queries.
Datasets
To evaluate these scaling properties, the authors compiled a massive environment consisting of:
- 1,141 real-world software agent skills curated from public repositories (Claude Code, MCP, public Agent Skills, and GitHub).
- 4,075 human-annotated tasks paired with gold-standard skill sequences.
- Downstream Benchmarks: To test real-world execution transfer, they evaluated performance on ClawBench (242 tasks across 18 tool-oriented domains) and ClawMark (100 tasks across 13 role-oriented domains).
Key Insights and Ideas
- Logarithmic Decay is Universal: Every single tested model followed the logarithmic decay curve for routing accuracy with an incredibly tight fit ($R^2 > 0.97$). Every doubling of library size costs roughly 3 percentage points in accuracy.
- The "Black-Hole" Attractor: As libraries grow, vague queries combined with highly abstract skill descriptions act as semantic gravity wells. Massively broad tools end up absorbing disproportionate routing probability mass, hijacking the agent.
- A Single Parameter Couples Selection and Execution: The routing decay slope ($b$) acts as a key state variable for the entire system. A model's pre-execution routing fragility ($b$) directly predicts its downstream execution rescue capacity without any extra refitting.
- The U-Shaped Pipeline Fragility: In multi-step plans without execution feedback, the middle steps are the most fragile and error-prone, while the final steps partially recover as the ultimate goal constrains the remaining choices.
Key Results
- Routing Optimization: Applying the Law-Guided Auto Skill Manager at a library size of $N=150$ raised held-out routing accuracy from 71.3% to 91.7%.
- Hijack Reduction: The manager successfully mitigated the "black-hole" effect, slashing the in-library hijack rate from 22.4% down to just 4.1%.
- Downstream Execution Gains: These structural library improvements successfully transferred to complex execution environments, boosting the mean pass rate from 49.3% to 61.6% on ClawBench and from 28.4% to 34.5% on ClawMark.
Limitations and Future Work
While highly actionable, the authors note several boundaries to their current findings:
- Flat Library Structure: The laws were derived using flat natural-language skill libraries. Future work is needed to see how these dynamics shift under hierarchical structures or when routing is handled by dedicated, learned retrieval architectures.
- Availability-Preserving Assumption: The study assumes the correct tool is always present in the library, focusing purely on misselection rather than missing capabilities.
- Static Context: The current framework does not fully isolate the causal impact of token-length growth versus pure semantic crowding, leaving an open avenue for exploring token-budget boundaries in long-context models.
Summary updated