mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Add configurable agent spawn depth (#12251)
Summary - expose `agents.max_depth` in config schema and toml parsing, with defaults and validation - thread-spawn depth guards and multi-agent handler now respect the configured limit instead of a hardcoded value - ensure documentation and helpers account for agent depth limits
This commit is contained in:
committed by
GitHub
Unverified
parent
d54999d006
commit
d87cf7794c
@@ -11,7 +11,6 @@ use crate::CodexAuth;
|
||||
use crate::SandboxState;
|
||||
use crate::agent::AgentControl;
|
||||
use crate::agent::AgentStatus;
|
||||
use crate::agent::MAX_THREAD_SPAWN_DEPTH;
|
||||
use crate::agent::agent_status_from_event;
|
||||
use crate::analytics_client::AnalyticsEventsClient;
|
||||
use crate::analytics_client::AppInvocation;
|
||||
@@ -315,7 +314,7 @@ impl Codex {
|
||||
}
|
||||
|
||||
if let SessionSource::SubAgent(SubAgentSource::ThreadSpawn { depth, .. }) = session_source
|
||||
&& depth >= MAX_THREAD_SPAWN_DEPTH
|
||||
&& depth >= config.agent_max_depth
|
||||
{
|
||||
config.features.disable(Feature::Collab);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user