From 4ee04c0aa5833ac39b1763f6ea44c7bc777c83dd Mon Sep 17 00:00:00 2001 From: ani-oai Date: Fri, 28 Aug 2026 17:14:39 +0000 Subject: [PATCH] Clarify proactive multi-agent delegation guidance (#41380) ## What changed - Limit the proactive-mode override to earlier developer instructions that require an explicit delegation request. - Preserve user requests as higher-priority guidance. - Encourage root agents and subagents to delegate parallel work when doing so could improve speed or quality. ## Testing - Update the multi-agent world-state snapshot for the revised proactive-mode message. GitOrigin-RevId: 0b61701980e0306dd37a925aceb23c75bf3c1af7 --- codex-rs/core/src/context/multi_agent_mode_instructions.rs | 2 +- ...text__world_state__multi_agent_mode__tests__snapshots.snap | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/context/multi_agent_mode_instructions.rs b/codex-rs/core/src/context/multi_agent_mode_instructions.rs index a03f125e3e..be84cad1bc 100644 --- a/codex-rs/core/src/context/multi_agent_mode_instructions.rs +++ b/codex-rs/core/src/context/multi_agent_mode_instructions.rs @@ -5,7 +5,7 @@ use codex_protocol::protocol::MULTI_AGENT_MODE_CLOSE_TAG; use codex_protocol::protocol::MULTI_AGENT_MODE_OPEN_TAG; const EXPLICIT_REQUEST_ONLY_MULTI_AGENT_MODE_TEXT: &str = "Any earlier instruction enabling proactive multi-agent delegation no longer applies. Do not spawn sub-agents unless the user or applicable AGENTS.md/skill instructions explicitly ask for sub-agents, delegation, or parallel agent work."; -const PROACTIVE_MULTI_AGENT_MODE_TEXT: &str = "Proactive multi-agent delegation is active. Any earlier instruction requiring an explicit user request before spawning sub-agents no longer applies. Use sub-agents when parallel work would materially improve speed or quality. This mode remains active until a later multi-agent mode developer message changes it."; +const PROACTIVE_MULTI_AGENT_MODE_TEXT: &str = "Proactive multi-agent delegation is active. Any earlier developer instruction requiring an explicit user request before spawning sub-agents no longer applies. This mode remains active until a later multi-agent mode developer message changes it. User requests override this hint.\n\nIf any point you can parallelize work by delegating tasks to another agent (no matter if you are root or subagent), you should do so using collaboration tools if it could save time or improve quality."; #[derive(Debug, Clone, PartialEq, Eq)] pub(crate) struct MultiAgentModeInstructions { diff --git a/codex-rs/core/src/context/world_state/snapshots/codex_core__context__world_state__multi_agent_mode__tests__snapshots.snap b/codex-rs/core/src/context/world_state/snapshots/codex_core__context__world_state__multi_agent_mode__tests__snapshots.snap index b55fb9b7ba..c010f1baee 100644 --- a/codex-rs/core/src/context/world_state/snapshots/codex_core__context__world_state__multi_agent_mode__tests__snapshots.snap +++ b/codex-rs/core/src/context/world_state/snapshots/codex_core__context__world_state__multi_agent_mode__tests__snapshots.snap @@ -15,7 +15,9 @@ Absent -> {"mode":"explicitRequestOnly"} (role - developer) None {"mode":"explicitRequestOnly"} -> {"mode":"proactive"} (role - developer) -Proactive multi-agent delegation is active. Any earlier instruction requiring an explicit user request before spawning sub-agents no longer applies. Use sub-agents when parallel work would materially improve speed or quality. This mode remains active until a later multi-agent mode developer message changes it. +Proactive multi-agent delegation is active. Any earlier developer instruction requiring an explicit user request before spawning sub-agents no longer applies. This mode remains active until a later multi-agent mode developer message changes it. User requests override this hint. + +If any point you can parallelize work by delegating tasks to another agent (no matter if you are root or subagent), you should do so using collaboration tools if it could save time or improve quality. {"mode":"proactive"} -> {} (role - developer) Any earlier instruction enabling proactive multi-agent delegation no longer applies. Do not spawn sub-agents unless the user or applicable AGENTS.md/skill instructions explicitly ask for sub-agents, delegation, or parallel agent work.