mirror of
https://github.com/openai/codex.git
synced 2026-11-15 06:51:36 +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:
1 parent
b7cd519c76
commit
a9519cbcdd
31 files changed
+500
-71
No files matched your search
@@ -78,7 +78,11 @@ pub(super) fn usage_hint_text(
|
||||
.as_ref()
|
||||
.and_then(|messages| messages.multi_agent.as_ref())
|
||||
.and_then(|messages| messages.role.as_ref());
|
||||
let snapshot = resolve_usage_hints(&turn_context.config.multi_agent_v2, catalog);
|
||||
let snapshot = resolve_usage_hints(
|
||||
&turn_context.config.multi_agent_v2,
|
||||
catalog,
|
||||
!turn_context.config.update_plan_enabled && turn_context.config.model_catalog.is_none(),
|
||||
);
|
||||
match session_source {
|
||||
SessionSource::SubAgent(SubAgentSource::ThreadSpawn { .. }) => snapshot.subagent,
|
||||
SessionSource::Cli
|
||||
@@ -94,6 +98,7 @@ pub(super) fn usage_hint_text(
|
||||
pub(crate) fn resolve_usage_hints(
|
||||
config: &MultiAgentV2Config,
|
||||
catalog: Option<&MultiAgentRoleMessages>,
|
||||
omit_update_plan_instructions: bool,
|
||||
) -> ResolvedMultiAgentV2UsageHints {
|
||||
let resolve_role = |configured: Option<&str>, catalog: Option<&str>, bundled: &str| {
|
||||
// Configured roles take precedence; empty configured or catalog roles suppress fallback.
|
||||
@@ -106,6 +111,11 @@ pub(crate) fn resolve_usage_hints(
|
||||
if base.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let base = if omit_update_plan_instructions {
|
||||
crate::context::without_update_plan_instructions(base)
|
||||
} else {
|
||||
base.to_string()
|
||||
};
|
||||
|
||||
let max_concurrency = config.max_concurrent_threads_per_session;
|
||||
let wait_agent_guidance = if config.wait_agent_enabled {
|
||||
|
||||
Reference in new issue
Block a user