From 352f37db03315dc215fbf23cb36b442554afb8c5 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Thu, 26 Mar 2026 16:36:12 +0000 Subject: [PATCH] fix: max depth agent still has v2 tools (#15880) --- codex-rs/core/src/tools/handlers/multi_agents_common.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/core/src/tools/handlers/multi_agents_common.rs b/codex-rs/core/src/tools/handlers/multi_agents_common.rs index 106f34253..452e05a2f 100644 --- a/codex-rs/core/src/tools/handlers/multi_agents_common.rs +++ b/codex-rs/core/src/tools/handlers/multi_agents_common.rs @@ -281,7 +281,7 @@ pub(crate) fn apply_spawn_agent_runtime_overrides( } pub(crate) fn apply_spawn_agent_overrides(config: &mut Config, child_depth: i32) { - if child_depth >= config.agent_max_depth { + if child_depth >= config.agent_max_depth && !config.features.enabled(Feature::MultiAgentV2) { let _ = config.features.disable(Feature::SpawnCsv); let _ = config.features.disable(Feature::Collab); }