Skip to content

[Phase 4] Reconciliation: Conductor Batch Loop Integration #405

Description

@frankbria

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

  1. 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
  2. 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
  3. 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

  1. Add --reconcile-interval flag to cf work batch run

Acceptance Criteria

  • Reconciliation runs between task dispatches in serial mode
  • Reconciliation runs on timer in parallel mode
  • Externally completed tasks are skipped with log message
  • Externally blocked tasks have their agents stopped
  • Resolved blockers cause tasks to be re-queued
  • cf work batch status reflects reconciliation events
  • Integration test: modify task state during batch, verify batch adjusts

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-4.4Phase 4.4: Batch Execution & Reconciliationsymphony-inspiredInspired by OpenAI Symphony spec analysis

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions