arXiv(opens in a new tab)cs.MAAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.29641

Harness-RL: Black-Box Reinforcement Learning with Action-Args Decoupling for Central-Agent Multi-Agent Harnesses

Xinke Jiang, Zhixin Zhang, Zhibang Yang, Jiaran Gao, Rihong Qiu, Shijin Chen, Xu Chu, Junfeng Zhao, Yasha Wang

Abstract

Large language model agents increasingly solve long-horizon tasks through multi-agent harnesses in which a central agent coordinates specialized sub-agents, tools, and environments. Training the central policy in such a harness raises two challenges. First, an action label is a low-cardinality decision, whereas its args form a high-dimensional conditional sequence; optimizing both with a shared sequence-level signal can produce conflicting gradients. Second, dynamic scheduling creates interdependent sessions with branches, parallel calls, and rewritten contexts, which cannot be faithfully reduced to one flat token sequence. We introduce HARNESS-RL, a structured reinforcement learning framework that combines Conflict-Aware Policy Optimization (CAPO) with interface-level black-box trajectory construction. The black-box component captures Interface Call Records, builds per-session prefix trees, and aligns outcome and process rewards with trainable tokens. CAPO uses forward activations to identify parameter partitions associated with action and args tokens, then routes their policy gradients to the corresponding subspaces. HARNESS-RL supports both central-only and joint multi-agent training. Across seven multi-hop question answering and agentic retrieval benchmarks, it reaches average F1 scores of 42.93 and 47.79 with Qwen2.5-1.5B and Qwen2.5-3B, respectively, while ablations validate the contribution of CAPO and favor central-only optimization in the evaluated setting. Our code is available at https://github.com/jiangxinke/Harness-RL.

1 Introduction

Large Language Models (LLMs) continue to advance (Guo et al., 2025; OpenAI, 2025; Yang et al., 2024), their applications are expanding beyond single-turn text generation toward agent systems capable of planning (Yao et al., 2022a), tool use (Jiang et al., 2024), and interaction with external environments. For complex reasoning, long-horizon task execution, and decision making in open environments, a single agent that generates a linear sequence is often insufficient. Researchers have therefore developed sophisticated agent harnesses that organize a central agent (Hou et al., 2024; Yue et al., 2025; Zhang et al., 2026), specialized sub-agents (Wu et al., 2023; Hong et al., 2024; Qian et al., 2024), external tools, memory modules, and an execution environment to decompose, execute, and coordinate complex tasks (Guo et al., 2024; Chen et al., 2025b).

Within such systems, the harness organizes the overall task workflow, while the central agent generally serves as the core policy model. The central agent is responsible for global task decomposition, sub-task dispatch, context maintenance, and multi-round decision coordination. Specialized sub-agents, by contrast, perform concrete operations within their respective capability domains, such as retrieval (Jin et al., 2025; Trivedi et al., 2023), code execution (Wu et al., 2023; Qian et al., 2024), and tool invocation (Jiang et al., 2024). Every decision made by the central agent affects the subsequent execution path and environment state. An incorrect action or a low-quality args can therefore have a cumulative effect over a long interaction. Consequently, this raises a key question: how can we effectively train the central agent's policy within a multi-agent harness to improve overall system performance?

Existing studies have made substantial progress in multi-agent system architectures (Wu et al., 2023; Hong et al., 2024; Qian et al., 2024), communication mechanisms (Du et al., 2024; Yang et al., 2025), workflow design (Qian et al., 2025a;

∗^{*}Equal contribution.

†^{\dagger}Corresponding authors.

Figure

Figure 1: Two challenges addressed by HARNESS-RL. Left: unified sequence-level optimization entangles Action and Args gradients. Right: dynamic multi-agent execution produces context-dependent trajectory trees that cannot be directly concatenated.

Zhang et al., 2025; Hu et al., 2025), and memory management (Zhang et al., 2026). Meanwhile, recent work such as Search-R1 (Jin et al., 2025) has demonstrated the effectiveness of reinforcement learning (RL) for tool use and agentic task execution. However, existing agentic RL methods generally make two implicit assumptions. At the policy-optimization level, different types of generated tokens can be jointly updated under a unified sequence-level objective. At the trajectory-modeling level, interactions within an agent harness can be reconstructed as a single linear token sequence according to a predefined workflow. As illustrated in Figure 1, these assumptions no longer hold in agent harnesses with dynamic sub-agent scheduling, conditional branches, loops, concurrency, backtracking, and context compression, giving rise to two challenges in policy optimization and trajectory modeling:

① Challenge 1: optimization conflicts between heterogeneous Action and Args decisions. Agents at different levels make decisions through Action–Args pairs. A central agent selects an operation or dispatches a sub-agent through an Action, while a sub-agent uses an Action to execute a task or invoke a tool. Args describe the corresponding sub-task content or invocation args. An Action is a low-cardinality discrete decision, whereas Args constitute high-flexibility sequence generation conditioned on that Action. Although both occur in the same autoregressive sequence, they differ in decision characteristics and optimization objectives. For example, the same DISPATCH Action may be paired with either a high-quality search query or an irrelevant or erroneous one. In this case, the difference in trajectory reward is primarily caused by the quality of Args. Standard GRPO (Shao et al., 2024) or DAPO (Yu et al., 2025), however, computes policy gradients uniformly over the full sequence, allowing the negative update induced by poor Args to interfere with an otherwise correct Action decision. As a result, the model may exhibit both unstable action planning and inadequate args generation.

② Challenge 2: multi-tree trajectory modeling and context alignment in a multi-agent harness. The central agent dynamically schedules multiple sub-agents, whose executions may themselves contain conditional branches, loops, concurrency, backtracking, and context compression. The complete harness interaction therefore no longer corresponds to a single trajectory tree; instead, it forms multiple related agent interaction trees. Contexts associated with different agents and branches must remain isolated, while retaining the cross-agent dependencies created by task dispatch, message passing, and shared environment state. These trajectories cannot be concatenated directly. Manually implementing rollout scripts, trajectory concatenation, and token-mask logic for each harness incurs substantial training-system overhead and is difficult to reuse.

To address these challenges, we propose HARNESS-RL, a black-box reinforcement learning framework with action-args decoupling for central-agent-driven multi-agent harnesses. The framework consists of two connected components: Conflict-Aware Policy Optimization (CAPO) and a black-box RL mechanism for multi-agent harnesses. CAPO constructs functional partitions for Action and Args and decouples their gradients. The black-box RL mechanism converts actual harness interactions into context-aligned training trajectories with attributable rewards. Together, the two components provide a unified solution spanning heterogeneous-decision optimization and complex multi-agent trajectory modeling.

① For CI, we introduce CAPO. It uses activation signals from model forward passes to measure the response strength of Action Tokens and Args Tokens across layers and structural units, and uses these statistics to construct the corresponding functional parameter partitions. During RL optimization, policy gradients produced by Action Tokens and Args Tokens primarily update their respective partitions. This design decouples action selection from args generation and reduces parameter interference between the two heterogeneous decision types. ② For C2, we introduce a black-box RL mechanism for multi-agent harnesses. The mechanism treats the harness as a black box and captures the input and output of each agent interaction. It reconstructs multiple related interaction trees according to inter-agent invocation relationships, thereby representing dynamic scheduling, branched execution, and cross-agent contextual dependencies in a unified form. It further groups contiguous generated content into action-level decision units and attributes global outcome rewards and local process rewards to the relevant agents and decisions. This enables trajectory modeling, context alignment, reward attribution, and policy optimization for complex multi-agent interactions. Our main contributions are as follows:

• We formulate policy training for central-agent-driven multi-agent harnesses and propose HARNESS-RL, which converts long-horizon, multi-round interactions among agents, tools, and the environment into structured RL trajectories and supports both central-only and joint multi-agent training.

• We combine CAPO, which uses forward activations and token-specific gradient routing to decouple Action and Args optimization, with a black-box RL mechanism that reconstructs multi-session trajectories and aligns outcome and process rewards with trainable decisions.

• Experiments on multiple multi-agent reasoning and collaboration benchmarks show that HARNESS-RL improves planning, dispatch, and coordination while outperforming strong baselines. Ablations further validate CAPO and the choice of training scope.

References (21)