diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 773218af7..580f3084e 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -99,7 +99,7 @@ "experimental_windows_sandbox": { "type": "boolean" }, - "hierarchical_agents": { + "child_agents_md": { "type": "boolean" }, "include_apply_patch_tool": { @@ -559,7 +559,7 @@ "experimental_windows_sandbox": { "type": "boolean" }, - "hierarchical_agents": { + "child_agents_md": { "type": "boolean" }, "include_apply_patch_tool": { diff --git a/codex-rs/core/src/features.rs b/codex-rs/core/src/features.rs index 5a9054eb9..620e777f4 100644 --- a/codex-rs/core/src/features.rs +++ b/codex-rs/core/src/features.rs @@ -89,7 +89,7 @@ pub enum Feature { /// Experimental shell snapshotting. ShellSnapshot, /// Append additional AGENTS.md guidance to user instructions. - HierarchicalAgents, + ChildAgentsMd, /// Experimental TUI v2 (viewport) implementation. Tui2, /// Enforce UTF8 output in Powershell. @@ -359,8 +359,8 @@ pub const FEATURES: &[FeatureSpec] = &[ default_enabled: false, }, FeatureSpec { - id: Feature::HierarchicalAgents, - key: "hierarchical_agents", + id: Feature::ChildAgentsMd, + key: "child_agents_md", stage: Stage::Experimental, default_enabled: false, }, diff --git a/codex-rs/core/src/project_doc.rs b/codex-rs/core/src/project_doc.rs index 365475e62..c763755af 100644 --- a/codex-rs/core/src/project_doc.rs +++ b/codex-rs/core/src/project_doc.rs @@ -69,7 +69,7 @@ pub(crate) async fn get_user_instructions( output.push_str(&skills_section); } - if config.features.enabled(Feature::HierarchicalAgents) { + if config.features.enabled(Feature::ChildAgentsMd) { if !output.is_empty() { output.push_str("\n\n"); } diff --git a/codex-rs/core/tests/suite/hierarchical_agents.rs b/codex-rs/core/tests/suite/hierarchical_agents.rs index cc7b78a94..5dfa63648 100644 --- a/codex-rs/core/tests/suite/hierarchical_agents.rs +++ b/codex-rs/core/tests/suite/hierarchical_agents.rs @@ -17,7 +17,7 @@ async fn hierarchical_agents_appends_to_project_doc_in_user_instructions() { let resp_mock = mount_sse_once(&server, sse_completed("resp1")).await; let mut builder = test_codex().with_config(|config| { - config.features.enable(Feature::HierarchicalAgents); + config.features.enable(Feature::ChildAgentsMd); std::fs::write(config.cwd.join("AGENTS.md"), "be nice").expect("write AGENTS.md"); }); let test = builder.build(&server).await.expect("build test codex"); @@ -52,7 +52,7 @@ async fn hierarchical_agents_emits_when_no_project_doc() { let resp_mock = mount_sse_once(&server, sse_completed("resp1")).await; let mut builder = test_codex().with_config(|config| { - config.features.enable(Feature::HierarchicalAgents); + config.features.enable(Feature::ChildAgentsMd); }); let test = builder.build(&server).await.expect("build test codex"); diff --git a/docs/agents_md.md b/docs/agents_md.md index 40222d113..3df0facdf 100644 --- a/docs/agents_md.md +++ b/docs/agents_md.md @@ -4,4 +4,4 @@ For information about AGENTS.md, see [this documentation](https://developers.ope ## Hierarchical agents message -When the `hierarchical_agents` feature flag is enabled (via `[features]` in `config.toml`), Codex appends additional guidance about AGENTS.md scope and precedence to the user instructions message and emits that message even when no AGENTS.md is present. +When the `child_agents_md` feature flag is enabled (via `[features]` in `config.toml`), Codex appends additional guidance about AGENTS.md scope and precedence to the user instructions message and emits that message even when no AGENTS.md is present.