fix: disable subagents unless env var explicitly provided

This commit is contained in:
Alex Hancock
2025-10-30 16:53:08 -04:00
parent c39775ea44
commit 4a06e2fc99
2 changed files with 4 additions and 0 deletions
@@ -93,6 +93,9 @@ pub struct TaskParameter {
}
pub fn should_enabled_subagents(model_name: &str) -> bool {
if std::env::var("GOOSE_ENABLE_SUBAGENTS").is_err() {
return false;
}
let config = crate::config::Config::global();
let is_autonomous = config.get_goose_mode().unwrap_or(GooseMode::Auto) == GooseMode::Auto;
if !is_autonomous {
+1
View File
@@ -22,6 +22,7 @@ export PATH="$SCRIPT_DIR/target/release:$PATH"
# Set default provider and model if not already set
export GOOSE_PROVIDER="${GOOSE_PROVIDER:-anthropic}"
export GOOSE_MODEL="${GOOSE_MODEL:-claude-sonnet-4-5-20250929}"
export GOOSE_ENABLE_SUBAGENTS=1
echo "Using provider: $GOOSE_PROVIDER"
echo "Using model: $GOOSE_MODEL"