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
4 changes: 2 additions & 2 deletions apps/staged/src-tauri/src/session_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const BACKGROUND_HOLD_CAP_SECS_ENV: &str = "STAGED_BACKGROUND_HOLD_CAP_SECS";
/// Overridable without a rebuild, since a hold that misbehaves in the field
/// needs an escape hatch that isn't "ship a new binary":
/// - `STAGED_BACKGROUND_HOLD=0` (or `false`/`no`/`off`) disables it.
/// - `STAGED_BACKGROUND_HOLD_CAP_SECS=<n>` replaces the 10-minute default cap.
/// - `STAGED_BACKGROUND_HOLD_CAP_SECS=<n>` replaces the 30-minute default cap.
///
/// Every `SessionConfig` construction site derives the value here so the policy
/// lives in one place.
Expand Down Expand Up @@ -7341,7 +7341,7 @@ mod tests {
.expect("background hold is enabled without overrides");

assert_eq!(config, acp_client::BackgroundHoldConfig::default());
assert_eq!(config.hold_cap, std::time::Duration::from_secs(600));
assert_eq!(config.hold_cap, std::time::Duration::from_secs(1800));
}

#[test]
Expand Down
9 changes: 5 additions & 4 deletions crates/acp-client/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,9 @@ pub struct BackgroundHoldConfig {
/// Bounds every hold regardless of signals — background shells can hang
/// forever, so an unbounded wait is never safe. On expiry the session
/// tears down flagged [`SessionSettleReason::HeldUntilCap`]. Defaults to
/// 10 minutes, matching the Bash tool's own max timeout so a single
/// blocking shell can't outlive its own ceiling by much.
/// 30 minutes — three times the Bash tool's own max timeout, so a chain
/// of blocking shells and the continuations they wake have room to
/// finish, while a hung one still can't hold the session open forever.
pub hold_cap: Duration,
/// Quiet window that must elapse — no notifications at all — with the
/// task set empty before the session is declared quiescent, once a
Expand Down Expand Up @@ -524,7 +525,7 @@ pub struct BackgroundHoldConfig {
impl Default for BackgroundHoldConfig {
fn default() -> Self {
Self {
hold_cap: Duration::from_secs(600),
hold_cap: Duration::from_secs(1800),
debounce: Duration::from_secs(10),
taskless_debounce: Duration::from_secs(1),
idle_latch_staleness: Duration::from_secs(120),
Expand Down Expand Up @@ -8058,7 +8059,7 @@ agent: http=false, sse=false). Select a provider that supports MCP over HTTP/SSE
// The poisoned-connection case: a busy frame's trailing idle was
// lost, so the latch reads busy at hold entry and nothing will ever
// release it. Without a staleness bound this hold — and every later
// hold on the connection — would run to the 10-minute cap.
// hold on the connection — would run to the full hold cap.
let mut state = HoldingState::new(
test_hold_config(),
TaskTrackingMode::Raw,
Expand Down