mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +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
@@ -1314,6 +1314,26 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
/// Render the request copy without changing instructions persisted or inherited by forks.
|
||||
pub(crate) async fn get_prompt_base_instructions(&self) -> BaseInstructions {
|
||||
let config = self.get_config().await;
|
||||
let instructions = self.get_base_instructions().await;
|
||||
if !config.update_plan_enabled
|
||||
&& config.model_catalog.is_none()
|
||||
&& matches!(
|
||||
instructions.provenance,
|
||||
Some(BaseInstructionsProvenance::Model { .. })
|
||||
)
|
||||
{
|
||||
BaseInstructions {
|
||||
text: crate::context::without_update_plan_instructions(&instructions.text),
|
||||
..instructions
|
||||
}
|
||||
} else {
|
||||
instructions
|
||||
}
|
||||
}
|
||||
|
||||
// Merges connector IDs into the session-level explicit connector selection.
|
||||
#[tracing::instrument(
|
||||
level = "trace",
|
||||
|
||||
Reference in new issue
Block a user