[codex] allow AGENTS.md and skills to authorize delegation (#30274)

Prompt update of MAv2 to include agents.md and skills more explicitly

should mimic: https://github.com/openai/codex/pull/27919
This commit is contained in:
Charles Du
2026-06-26 12:17:26 -07:00
committed by GitHub
parent a938d5f607
commit 79a8ffdbf7
6 changed files with 11 additions and 8 deletions
@@ -21,7 +21,7 @@ use core_test_support::wait_for_event;
use pretty_assertions::assert_eq;
use serde_json::Value;
const NO_SPAWN_TEXT: &str = "Do not spawn sub-agents unless the user explicitly asks for sub-agents, delegation, or parallel agent work.";
const NO_SPAWN_TEXT: &str = "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_TEXT: &str = "Proactive multi-agent delegation is active.";
fn add_ultra_reasoning(model_info: &mut ModelInfo) {
+1 -1
View File
@@ -858,7 +858,7 @@ async fn tool_search_returns_deferred_v1_multi_agent_tools() -> Result<()> {
.and_then(Value::as_str)
.expect("spawn_agent description should be present");
assert!(description.contains(
"Do not spawn sub-agents unless the user explicitly asks for sub-agents, delegation, or parallel agent work."
"Do not spawn sub-agents unless the user or applicable AGENTS.md/skill instructions explicitly ask for sub-agents, delegation, or parallel agent work."
));
assert!(description.contains("### Designing delegated subtasks"));
assert!(!description.contains("### When to delegate vs. do the subtask yourself"));
@@ -213,7 +213,7 @@ async fn spawn_agent_description_lists_visible_models_and_reasoning_efforts() ->
);
assert!(
description.contains(
"Do not spawn sub-agents unless the user explicitly asks for sub-agents, delegation, or parallel agent work."
"Do not spawn sub-agents unless the user or applicable AGENTS.md/skill instructions explicitly ask for sub-agents, delegation, or parallel agent work."
),
"expected explicit authorization rule in spawn_agent description: {description:?}"
);