CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agents
Tianxiang Fei, Cheng Chen, Yue Pan, Mao Zheng, Mingyang Song

TL;DR
CodeDelegator introduces a multi-agent framework that separates strategic planning from detailed implementation in code-as-action tasks, reducing context pollution and improving long-term performance.
Contribution
It proposes role separation with persistent oversight and ephemeral execution contexts, enhancing multi-step reasoning in LLM-based agents.
Findings
Significantly improves task success rates across benchmarks.
Reduces context pollution from debugging traces and failures.
Enhances long-horizon reasoning in code-based agent systems.
Abstract
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),…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software System Performance and Reliability · Topic Modeling
