fix: pass autonomy_level through to prompt builder in wrapper function

build_system_prompt_with_mode was discarding the autonomy_level
parameter, passing None to build_system_prompt_with_mode_and_autonomy.
This caused full-autonomy prompts to still include "ask before acting"
instructions. Convert the level to an AutonomyConfig and pass it through.
This commit is contained in:
argenis de la rosa
2026-03-19 15:56:37 -04:00
committed by Roman Tataurov
parent e256b39733
commit 4d7853ca5f
+5 -1
View File
@@ -2896,6 +2896,10 @@ pub fn build_system_prompt_with_mode(
skills_prompt_mode: crate::config::SkillsPromptInjectionMode,
autonomy_level: AutonomyLevel,
) -> String {
let autonomy_cfg = crate::config::AutonomyConfig {
level: autonomy_level,
..Default::default()
};
build_system_prompt_with_mode_and_autonomy(
workspace_dir,
model_name,
@@ -2903,7 +2907,7 @@ pub fn build_system_prompt_with_mode(
skills,
identity_config,
bootstrap_max_chars,
None,
Some(&autonomy_cfg),
native_tools,
skills_prompt_mode,
)