Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion app/src/settings/ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,22 @@ define_settings_group!(AISettings, settings: [
}


// Whether multi-agent orchestration is enabled. When enabled, the agent can
// spawn and coordinate parallel sub-agents via StartAgent / SendMessageToAgent
// tools. This setting is only effective when FeatureFlag::OrchestrationV2 is also
// enabled.
orchestration_enabled: OrchestrationEnabled {
type: bool,
default: true,
supported_platforms: SupportedPlatforms::DESKTOP,
sync_to_cloud: SyncToCloud::Globally(RespectUserSyncSetting::Yes),
private: false,
toml_path: "agents.warp_agent.other.orchestration_enabled",
description: "Whether multi-agent orchestration is enabled.",
feature_flag: FeatureFlag::OrchestrationV2,
}


// Whether file-based MCP servers from third-party AI tools (e.g. Claude, Codex) should
// be automatically detected and spawned. Warp-native config files (.warp/.mcp.json) are
// always detected and spawned, regardless of this setting.
Expand Down Expand Up @@ -1674,7 +1690,9 @@ impl AISettings {
}

pub fn is_orchestration_enabled(&self, app: &warpui::AppContext) -> bool {
FeatureFlag::OrchestrationV2.is_enabled() && self.is_any_ai_enabled(app)
FeatureFlag::OrchestrationV2.is_enabled()
&& self.is_any_ai_enabled(app)
&& *self.orchestration_enabled
}

/// Returns true when local-to-cloud handoff is effectively enabled.
Expand Down
20 changes: 19 additions & 1 deletion app/src/settings/ai_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ fn test_toolbar_command_map_matched_agent() {
}

#[test]
fn orchestration_v2_enables_orchestration_when_ai_is_enabled() {
fn orchestration_v2_and_user_setting_enable_orchestration_when_ai_is_enabled() {
let _orchestration_v2_flag = FeatureFlag::OrchestrationV2.override_enabled(true);

App::test((), |mut app| async move {
Expand All @@ -404,6 +404,24 @@ fn orchestration_v2_enables_orchestration_when_ai_is_enabled() {
});
}

#[test]
fn orchestration_user_opt_out_disables_orchestration_even_when_v2_is_enabled() {
let _orchestration_v2_flag = FeatureFlag::OrchestrationV2.override_enabled(true);

App::test((), |mut app| async move {
initialize_settings_for_tests(&mut app);
add_ai_enablement_dependencies_for_test(&mut app);

AISettings::handle(&app).update(&mut app, |settings, ctx| {
report_if_error!(settings.orchestration_enabled.set_value(false, ctx));
});

AISettings::handle(&app).read(&app, |settings, ctx| {
assert!(!settings.is_orchestration_enabled(ctx));
});
});
}

#[test]
fn orchestration_v2_disabled_disables_orchestration() {
let _orchestration_v2_flag = FeatureFlag::OrchestrationV2.override_enabled(false);
Expand Down
Loading