Saved in:
Bibliographic Details
Main Authors: Fei, Tianxiang, Chen, Cheng, Pan, Yue, Zheng, Mao, Song, Mingyang
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2601.14914
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908779774214144
author Fei, Tianxiang
Chen, Cheng
Pan, Yue
Zheng, Mao
Song, Mingyang
author_facet Fei, Tianxiang
Chen, Cheng
Pan, Yue
Zheng, Mao
Song, Mingyang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2601_14914
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agents
Fei, Tianxiang
Chen, Cheng
Pan, Yue
Zheng, Mao
Song, Mingyang
Computation and Language
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.
title CodeDelegator: Mitigating Context Pollution via Role Separation in Code-as-Action Agents
topic Computation and Language
url https://arxiv.org/abs/2601.14914