Keeps this page in sync as the body changes. Pause it any time for a quieter view.
Path /specs/data-driven-timeout-resume
Last refresh never
Spec: Data-Driven Timeout and Task Resume
inventory_source local | spec_api /api/spec-registry/data-driven-timeout-resume | registry_updated 2026-04-09T03:10:08.874232Z
potential_value 0.00 | actual_value 1.00 | value_gap 0.00
estimated_cost 0.00 | actual_cost 1.00 | cost_gap 1.00
estimated_roi 0.00 | actual_roi 1.00
Missing contributor linkage. Submit a change request with contributor attribution.
Open process view for this spec
task_ids -
branches -
source_files specs/auto-heal-from-diagnostics.md, specs/data-driven-timeout-resume.md, specs/failed-task-diagnostics-contract.md, specs/heal-completion-issue-resolution.md, specs/incident-response-and-self-healing.md, specs/smart-reap.md, specs/stale-task-reaper.md, specs/task-deduplication.md
evidence_refs -
Open implementation view for this spec
implementation_refs spec-registry:auto-heal-from-diagnostics, spec-registry:data-driven-timeout-resume, spec-registry:failed-task-diagnostics-contract, spec-registry:heal-completion-issue-resolution, spec-registry:incident-response-and-self-healing, spec-registry:smart-reap, spec-registry:stale-task-reaper, spec-registry:task-deduplication
lineage_ids -
public_endpoints -
summary Currently, task timeouts are **flat constants** by task type (`spec=1200s`, `impl=2400s`, `test=1800s`, `review=1200s`, `heal=1200s`). These are guesses that don't account for provider speed, task complexity, or historical performance. This spec introduces data-driven timeouts derived from execution measurements, and task resume that preserves partial work on timeout so tasks continue instead of restart.
process_summary Record timeout samples to JSONL on every task completion; Adaptive timeout uses p90 * 1.5 with min 5 samples to activate; Fall back to flat defaults when fewer than 5 samples exist; Upper-clamp adaptive timeout at 3x baseline per task type; Capture partial_output and partial_output_pct on timeout
pseudocode_summary -
implementation_summary api/app/services/smart_reap_service.py (timeout extension logic); api/app/services/agent_execution_retry.py (_resolve_retry_max()); api/app/services/agent_task_continuation_service.py (task continuation)