Summary
Wire the reconciliation engine into the conductor's batch execution loop so running batches respond to external state changes.
Parent issue: #403
Scope
Changes to core/conductor.py
-
Add reconciliation check between task dispatches:
- After each task completes (or on a timer for parallel execution)
- Call
reconciler.check_tasks() for all queued and running tasks
- Apply recommended actions:
SKIP: Remove task from queue, log skip reason
KILL: Cancel running agent for that task (if parallel)
REQUEUE: Move blocked task back to ready queue
NONE: No action needed
-
Configurable reconciliation interval:
--reconcile-interval CLI flag (default: 30s)
0 disables reconciliation (current behavior)
- For serial execution: check between each task
- For parallel execution: check on timer + after each task completion
-
Batch status reporting:
- Track reconciliation events in batch status
- Show "3 tasks skipped (externally completed)" in
cf work batch status
Changes to cli/app.py
- Add
--reconcile-interval flag to cf work batch run
Acceptance Criteria
Dependencies
Summary
Wire the reconciliation engine into the conductor's batch execution loop so running batches respond to external state changes.
Parent issue: #403
Scope
Changes to
core/conductor.pyAdd reconciliation check between task dispatches:
reconciler.check_tasks()for all queued and running tasksSKIP: Remove task from queue, log skip reasonKILL: Cancel running agent for that task (if parallel)REQUEUE: Move blocked task back to ready queueNONE: No action neededConfigurable reconciliation interval:
--reconcile-intervalCLI flag (default: 30s)0disables reconciliation (current behavior)Batch status reporting:
cf work batch statusChanges to
cli/app.py--reconcile-intervalflag tocf work batch runAcceptance Criteria
cf work batch statusreflects reconciliation eventsDependencies