reconcile_tasks
Scan stale running or collecting_artifacts tasks to generate a diagnosis report, or apply high-confidence status transitions with atomic writes and backup.
Instructions
v0.7.0: Scan stale running/collecting_artifacts tasks and either report or safely fix them. report_only (default) returns a diagnosis report without modifying state. safe_fix additionally writes high-confidence status transitions (failed_stale/orphaned/done_by_agent) atomically with backup (status.json.bak), audit fields, and an appended reconcile.log. Never touches tasks still owned by an active watcher; never applies medium/low confidence fixes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | report_only: read-only diagnosis report. safe_fix: additionally apply high-confidence status transitions with backup + atomic write + reconcile.log. | report_only |
| max_age_minutes | No | Only consider tasks older than this (based on created_at or status.json mtime). Default 30 minutes. | |
| include_done_candidates | No | Include done_by_agent tasks as candidates (useful for auditing acceptance_status). Default true. |