mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:10:37 +00:00
Make the update_plan tool opt-in (#41744)
## What changed - Default `tools.update_plan.enabled` to `false`; users can explicitly enable it to expose `update_plan`. - Remove bundled `update_plan` guidance from model, collaboration-mode, multi-agent, compaction, prewarm, and goal-continuation prompts when the tool is disabled. - Preserve custom base instructions, model catalog instructions, collaboration policies, and user goal text even when they mention planning or `update_plan`. ## Testing - Cover default and explicitly enabled tool registration, prompt consistency across request paths, and preservation of custom instructions. GitOrigin-RevId: a53964e6e72f98e2557dd3090fdb7caccb956527
This commit is contained in:
@@ -196,7 +196,11 @@ async fn handle_spawn_agent(
|
||||
.as_ref()
|
||||
.and_then(|messages| messages.multi_agent.as_ref())
|
||||
.and_then(|messages| messages.role.as_ref());
|
||||
Some(resolve_usage_hints(&config.multi_agent_v2, child_catalog))
|
||||
Some(resolve_usage_hints(
|
||||
&config.multi_agent_v2,
|
||||
child_catalog,
|
||||
!config.update_plan_enabled && config.model_catalog.is_none(),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
@@ -855,18 +855,18 @@ async fn request_user_input_tool_respects_experimental_config_gate() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn update_plan_tool_respects_config_gate() {
|
||||
let enabled = probe(|_| {}).await;
|
||||
enabled.assert_visible_contains(&["update_plan"]);
|
||||
enabled.assert_registered_contains(&["update_plan"]);
|
||||
let disabled = probe(|_| {}).await;
|
||||
disabled.assert_visible_lacks(&["update_plan"]);
|
||||
disabled.assert_registered_lacks(&["update_plan"]);
|
||||
|
||||
let disabled = probe(|turn| {
|
||||
let enabled = probe(|turn| {
|
||||
update_config(turn, |config| {
|
||||
config.update_plan_enabled = false;
|
||||
config.update_plan_enabled = true;
|
||||
});
|
||||
})
|
||||
.await;
|
||||
disabled.assert_visible_lacks(&["update_plan"]);
|
||||
disabled.assert_registered_lacks(&["update_plan"]);
|
||||
enabled.assert_visible_contains(&["update_plan"]);
|
||||
enabled.assert_registered_contains(&["update_plan"]);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user