CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Recent advances in large language models (LLMs) allow agents to represent actions as executable code, offering greater expressivity than traditional tool-calling. However, real-world tasks often demand both strategic planning and detailed implementation. Using a single agent for both leads to context pollution from debugging traces and intermediate failures, impairing long-horizon performance. We propose CodeDelegator, a multi-agent framework that separates planning from implementation via role specialization. A persistent Delegator maintains strategic oversight by decomposing tasks, writing specifications, and monitoring progress without executing code. For each sub-task, a new Coder agent is instantiated with a clean context containing only its specification, shielding it from prior failures. To coordinate between agents, we introduce Ephemeral-Persistent State Separation (EPSS), which isolates each Coder's execution state while preserving global coherence, preventing debugging traces from polluting the Delegator's context. Experiments on various benchmarks demonstrate the effectiveness of CodeDelegator across diverse scenarios.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 20 of its 34 references that are in the map. First posted on arXiv 21 Jan 2026.
Builds on
20 of 34 references.
Closest ancestors · 5
Same direction, newest first
- 2025The OpenHands Software Agent SDK: A Composable and Extensible Foundation for Production Agents5 Nov
- 2025Why Do Multi-Agent LLM Systems Fail?17 Mar
- 2024AFlow: Automating Agentic Workflow Generation14 Oct
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation16 Aug
Other references · 15
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,280
- 2022Inner Monologue: Embodied Reasoning through Planning with Language Modelscited by 1,057
- 2025τ2-Bench: Evaluating Conversational Agents in a Dual-Control Environmentcited by 558
- 2023Auto-GPT for Online Decision Making: Benchmarks and Additional Opinionscited by 250
- 2024Tool Learning with Large Language Models: A Surveycited by 221
- 2025OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automationcited by 129
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Beyond Individual Intelligence: Surveying Collaboration, Failure Attribution, and Self-Evolution in LLM-based Multi-Agent Systemscited by 5
- 2026How Much Coordination Gain Is Real? A Paired Noise-Floor Protocol for Multi-Agent LLM Benchmarkscited by 2
- 2026Dynamic Attentional Context Scoping: Agent-Triggered Focus Sessions for Isolated Per-Agent Steering in Multi-Agent LLM Orchestrationcited by 1
- 2026Rethinking Multi-Agent Collaboration: When More Is Lesscited by 0
- 2026Rethinking Multi-Agent Collaboration: When More Is Less17 Sep 2026
- 2026How Much Coordination Gain Is Real? A Paired Noise-Floor Protocol for Multi-Agent LLM Benchmarks15 Jun 2026
- 2026Beyond Individual Intelligence: Surveying Collaboration, Failure Attribution, and Self-Evolution in LLM-based Multi-Agent Systems14 May 2026
- 2026Dynamic Attentional Context Scoping: Agent-Triggered Focus Sessions for Isolated Per-Agent Steering in Multi-Agent LLM Orchestration9 Apr 2026
Similar, not cited
Close in wording, no citation either way
- 2026AgentExecutor: Partial Code Execution via Agentic Context Generation
- 2026Code as Agent Harness
- 2026Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architectures
- 2026openJiuwen: Beyond Static Harnesses for Long-Horizon Coding Agents
- 2026TRIM: Reducing AI-Generated CodeSlop via Agent Trajectory Minimization
- 2026Composing Task-specific Agent Harnesses at Test Time with Reusable Primitives
- 2026CodeCompass: Navigating the Navigation Paradox in Agentic Code Intelligence
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding