Summary
Give stall_timeout_secs a conservative non-zero default so a stalled turn aborts and retries instead of hanging indefinitely.
Problem statement
stall_timeout_secs documents 0 = disabled, and 0 is the default β so the stall watchdog ships off.
A turn that stops making progress (provider stops streaming, upstream connection wedges) hangs with no abort and no retry. The operator's only signal is a bot that never replies, which is indistinguishable from a dozen other failure modes. The recovery mechanism already exists and is simply not enabled.
Proposed solution
Default stall_timeout_secs to a conservative non-zero value. 300 is a starting suggestion; the specific value is a maintainer call. 0 remains available to disable the watchdog explicitly.
Suggested sequencing:
- Agree a default generous enough not to abort legitimately slow turns.
- Change the default; document it and note it in the changelog.
- Add a regression test covering the abort-and-retry path at the default.
Non-goals / out of scope
- No change to retry counts or backoff strategy.
- No new watchdog behaviour β this only enables what already exists.
- No change to
approval_timeout_secs or other channel timeouts.
Alternatives considered
- Keep
0 and document the recommendation. Leaves every install one wedged connection away from a silent hang, and the failure is hard to attribute.
- Enable only for specific channels. Arbitrary: the failure mode is transport-independent.
- Derive it from an existing timeout. Couples two unrelated tunables and makes the effective value harder to reason about.
Acceptance criteria
- Default is non-zero and documented.
- A stalled turn aborts and retries within the window.
0 still disables the watchdog.
- A regression test covers the abort path.
Architecture impact
channels/, docs/. No security surface: this changes failure recovery only, not what the agent may read, write, or execute.
Risk and rollback
Risk: a legitimately slow turn is aborted mid-flight if the default is too low β the main argument for a generous value rather than an aggressive one. Worth confirming during implementation whether abort-and-retry is safe for a turn that had already acted before stalling; that concern exists today for anyone who enabled the watchdog manually.
Rollback: set stall_timeout_secs = 0, restoring today's behaviour exactly.
Expected routing
Ordinary feature triage
Next decision surface
Ordinary triage is enough; the only genuinely open question is the specific value. Companion to #10166; the two are independent and can land separately.
Breaking change?
Yes
Data hygiene checks
Summary
Give
stall_timeout_secsa conservative non-zero default so a stalled turn aborts and retries instead of hanging indefinitely.Problem statement
stall_timeout_secsdocuments0 = disabled, and0is the default β so the stall watchdog ships off.A turn that stops making progress (provider stops streaming, upstream connection wedges) hangs with no abort and no retry. The operator's only signal is a bot that never replies, which is indistinguishable from a dozen other failure modes. The recovery mechanism already exists and is simply not enabled.
Proposed solution
Default
stall_timeout_secsto a conservative non-zero value. 300 is a starting suggestion; the specific value is a maintainer call.0remains available to disable the watchdog explicitly.Suggested sequencing:
Non-goals / out of scope
approval_timeout_secsor other channel timeouts.Alternatives considered
0and document the recommendation. Leaves every install one wedged connection away from a silent hang, and the failure is hard to attribute.Acceptance criteria
0still disables the watchdog.Architecture impact
channels/,docs/. No security surface: this changes failure recovery only, not what the agent may read, write, or execute.Risk and rollback
Risk: a legitimately slow turn is aborted mid-flight if the default is too low β the main argument for a generous value rather than an aggressive one. Worth confirming during implementation whether abort-and-retry is safe for a turn that had already acted before stalling; that concern exists today for anyone who enabled the watchdog manually.
Rollback: set
stall_timeout_secs = 0, restoring today's behaviour exactly.Expected routing
Ordinary feature triage
Next decision surface
Ordinary triage is enough; the only genuinely open question is the specific value. Companion to #10166; the two are independent and can land separately.
Breaking change?
Yes
Data hygiene checks