Keeps this page in sync as the body changes. Pause it any time for a quieter view.
Path /specs/smart-reap
Last refresh never
Smart Reap — Diagnose, Capture, and Resume Stuck Tasks
inventory_source local | spec_api /api/spec-registry/smart-reap | registry_updated 2026-04-09T03:10:09.024098Z
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 -
evidence_refs -
Open implementation view for this spec
implementation_refs -
lineage_ids -
public_endpoints -
summary *Format: [specs/TEMPLATE.md](TEMPLATE.md)*
process_summary Runner liveness check before reaping — query runner registry, skip if alive; Timeout extension for live runners — extend deadline by max_age_minutes, max 2 extensions; Provider-crash capture — read last 4kB of task log, classify crash type; Structured diagnosis in task context — write reap_diagnosis sub-object; Resume task when partial output >= 20% — create continuation task with partial work
pseudocode_summary -
implementation_summary api/app/services/smart_reap_service.py (is_runner_alive(), can_extend(), partial output); api/app/services/smart_reaper_service.py (runner liveness, reap_diagnosis); api/app/routers/agent_smart_reap_routes.py (smart reap endpoints)