Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architectures
Summary: arXiv:2604.03515v1 Announce Type: cross
Abstract
LLM-based coding agents have shown remarkable capabilities in localizing bugs, generating patches, and executing tests with decreasing levels of human oversight. However, the underlying scaffolding code that supports these language models—comprising control loops, tool definitions, state management, and context strategies—remains poorly understood. Existing surveys typically classify agents based on abstract capabilities such as tool use, planning, and reflection, which fail to differentiate between architecturally unique systems. Furthermore, trajectory studies observe the actions of agents without delving into the scaffold code that elucidates the reasons behind their behaviors.
This paper introduces a source-code-level architectural taxonomy developed from an analysis of 13 open-source coding agent scaffolds at pinned commit hashes. Each agent is examined across 12 dimensions organized into three primary layers: control architecture, tool and environment interface, and resource management. The findings indicate that scaffold architectures are resistant to discrete classification; control strategies vary from fixed pipelines to Monte Carlo Tree Search, tool counts range from 0 to 37, and context compaction encompasses seven distinct strategies.
Key Findings
- Control Strategies: Agents employ a variety of control strategies, including fixed pipelines and Monte Carlo Tree Search.
- Tool Count Variability: The number of tools utilized by agents varies significantly, with some agents using none while others utilize up to 37 tools.
- Context Compaction: Agents implement seven distinct strategies for context compaction, demonstrating diverse approaches to managing information.
- Loop Primitives: Five fundamental loop primitives—ReAct, generate-test-repair, plan-execute, multi-attempt retry, and tree search—serve as composable building blocks that agents combine in various configurations. Notably, 11 out of 13 agents incorporate multiple primitives rather than relying on a singular control structure.
- Dimension Convergence and Divergence: Dimensions converge where external constraints dominate, such as tool capability categories and execution isolation. Conversely, they diverge in areas where open design questions persist, including state management and multi-model routing.
Conclusion
The taxonomic claims presented in this study are grounded in concrete data, including file paths and line numbers, which offer a reusable reference for researchers investigating agent behavior. This work provides valuable insights for practitioners involved in designing new scaffolds, encouraging a deeper understanding of the architectural elements that define coding agents. By illuminating the complexities of scaffold code, this research aims to pave the way for more effective and innovative coding agent architectures in the future.
