Skip to content

feat: implement Hybrid Plan + ReAct execution loop #199

@Aureliolo

Description

@Aureliolo

Summary

The spec defines a third execution loop (Loop 3: Hybrid) that combines planning with per-step mini-ReAct loops and checkpointing. ReAct (Loop 1) and Plan-and-Execute (Loop 2) are implemented; Hybrid is not.

Design Spec Reference

  • §6.5 Agent Execution Loop — Loop 3: Hybrid Plan + ReAct Steps

Scope

  • High-level plan generation (3–7 steps)
  • Per-step mini-ReAct loop with own turn limit
  • Checkpoint after each step (progress summary)
  • Optional replanning of remaining steps
  • ExecutionLoop protocol compliance

Research Context

StructuredAgent AND/OR Trees (arXiv:2603.05294) — Consider as Loop 4 candidate:

  • AND nodes (all children succeed), OR nodes (any child suffices), DFS traversal with 3 states
  • 52.6% on WebArena vs 46.4% flat ReAct — significant improvement on long-horizon tasks
  • Node repair: modify/add children within revision budget before cascading failure up
  • Observation summarizer: compress full history into progress + constraint summaries
  • Auto-select for complex/epic tasks via get_loop_type() -> "andor_tree"
  • No code released — adapt algorithms

See research/structuredagent-andor-trees.md in project memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:mediumShould do, but not blockingscope:large3+ days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent Systemspec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow Enginetype:featureNew feature implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions