Skip to content
Merged
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
12 changes: 6 additions & 6 deletions desktop/src-tauri/src/managed_agents/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,14 @@ pub fn spawn_agent_child(
if known_acp_provider(&record.agent_command).is_some_and(|p| p.mcp_hooks) {
command.env("MCP_HOOK_SERVERS", "*");
}
// Only emit SPROUT_ACP_IDLE_TIMEOUT when the user has explicitly set an
// override. When unset, the sprout-acp harness applies its own default
// (see `DEFAULT_IDLE_TIMEOUT_SECS` in crates/sprout-acp/src/config.rs),
// which is the single source of truth. The previously-emitted
// `SPROUT_ACP_TURN_TIMEOUT` is deprecated upstream and was pinning every
// agent to the desktop's stale default (320s), bypassing harness bumps.
if let Some(idle) = record.idle_timeout_seconds {
command.env("SPROUT_ACP_IDLE_TIMEOUT", idle.to_string());
command.env("SPROUT_ACP_TURN_TIMEOUT", idle.to_string());
} else {
command.env(
"SPROUT_ACP_TURN_TIMEOUT",
record.turn_timeout_seconds.to_string(),
);
}

let max_dur = record
Expand Down
8 changes: 7 additions & 1 deletion desktop/src-tauri/src/managed_agents/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,13 @@ pub struct UpdateTeamRequest {
pub const DEFAULT_ACP_COMMAND: &str = "sprout-acp";
pub const DEFAULT_AGENT_COMMAND: &str = "goose";
pub const DEFAULT_MCP_COMMAND: &str = "sprout-mcp-server";
/// ~5 min (320s) — matches the CLI harness default (SPROUT_ACP_IDLE_TIMEOUT).
/// Default for the legacy `turn_timeout_seconds` field on the agent record.
///
/// As of the deprecation of `SPROUT_ACP_TURN_TIMEOUT` in sprout-acp, this
/// field is no longer wired into the spawn path — the harness owns the
/// effective idle-timeout default. The value is kept here only to satisfy
/// existing persisted records and the `CreateAgentDialog` form state. Prefer
/// `idle_timeout_seconds` (mapped to `SPROUT_ACP_IDLE_TIMEOUT`) for overrides.
pub const DEFAULT_AGENT_TURN_TIMEOUT_SECONDS: u64 = 320;
/// 1 hour — absolute wall-clock safety cap per turn.
pub const DEFAULT_AGENT_MAX_TURN_DURATION_SECONDS: u64 = 3600;
Expand Down
Loading