{"spec_id":"data-driven-timeout-resume","title":"Spec: Data-Driven Timeout and Task Resume","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.","potential_value":0.0,"actual_value":1.0,"estimated_cost":0.0,"actual_cost":1.0,"value_gap":0.0,"cost_gap":1.0,"estimated_roi":0.0,"actual_roi":1.0,"idea_id":"pipeline-reliability","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":null,"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)","created_by_contributor_id":null,"updated_by_contributor_id":null,"created_at":"2026-04-09T03:10:08.874232Z","updated_at":"2026-04-09T03:10:08.874232Z","content_path":"specs/data-driven-timeout-resume.md","content_hash":"2481503642186b1f","workspace_id":"coherence-network"}