Skip to content

[Phase 2.5-C] Wire ReactAgent into runtime with --engine react CLI flag #348

Description

@frankbria

Summary

Connect the ReactAgent to CodeFRAME's existing runtime and CLI so users can opt in via cf work start <task-id> --execute --engine react.

Acceptance Criteria

  • codeframe/core/runtime.py updated:
    • execute_agent() accepts engine parameter: "plan" (default, existing Agent) or "react" (new ReactAgent)
    • When engine="react", instantiates and runs ReactAgent instead of Agent
    • All existing runtime behavior (run lifecycle, state transitions, event emission) preserved
  • codeframe/cli/app.py updated:
    • cf work start accepts --engine option (default: "plan")
    • --engine react passes through to runtime
    • Help text documents the option
  • Integration test: cf work start <task-id> --execute --engine react creates a run, invokes ReactAgent, and completes
  • Backward compatibility: all existing CLI behavior unchanged when --engine not specified
  • All existing tests pass

Implementation Notes

  • Minimal changes to runtime.py — just an if engine == "react": use ReactAgent else: use Agent branch
  • The --engine flag should also work with cf work batch run (pass engine to conductor)
  • Runtime's run lifecycle (start_task_run, complete_run, fail_run, block_run) is reused as-is

Dependencies

Reference

  • docs/AGENT_V3_UNIFIED_PLAN.md (Architecture → High-Level Design)
  • docs/REACT_AGENT_ARCHITECTURE.md (Section 7, Phase C)

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase-2.5Phase 2.5: Agent Execution Redesign (ReAct)phase-2.5-CPhase C: ReAct Agent Core

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions