Decoupled Multi-Agent Software Engineering: Mitigating Context Degradation and Inference Cost via Local-Cloud Subagent Orchestration
The rapid adoption of Large Language Models (LLMs) in software engineering has been dominated by monolithic, cloud-hosted coding assistants that tightly couple the developer interface, orchestration loop, and frontier inference model. While effective for isolated prototyping, scaling monolithic agents across large codebases introduces severe operational bottlenecks: linear-to-exponential token expenditure, non-linear attention degradation over long contexts ("context rot"), and intellectual property (IP) exposure across external APIs. In this paper, we present a decoupled multi-agent software engineering architecture that separates the developer harness from inference execution using the Agent Client Protocol (ACP). We formalize a hierarchical "Big Brain / Little Brain" orchestration paradigm combined with Spec-Driven Development (SDD) constitutions and ephemeral, tool-restricted local Small Language Model (SLM) subagents. Empirical evaluation on a standardized microservice benchmark demonstrates that isolating subagent context windows reduces session token volume from 694k to 110k tokens (28% metered cost reduction in cloud-routed configurations), while offloading implementation tasks to locally hosted quantized SLMs (12B–27B parameters) reduces external cloud inference costs by 80%–95% down to ~$0.02 per feature, or $0.00 in air-gapped sovereign deployments. Finally, we catalog five recurring SLM failure modes in autonomous coding and provide deterministic harness-level mitigations.
Authors
- Fouad Sabry
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-24
- DOI
- https://doi.org/10.5281/zenodo.24503943
- Primary Topic
- Software Engineering Research
- Type
- preprint