Skip to content

[P1.13] Stuck-loop detection must not mark the task COMPLETED (currently returns AgentStatus.COMPLETED) #740

Description

@frankbria

Severity: medium | Category: correctness | Phase: P1.13

Problem

When the same tool signature repeats 3×, _react_loop returns COMPLETED; final verification passes against the already-green repo, so a stuck agent that implemented nothing → task DONE → (with auto-close) the linked GitHub issue is closed. A stuck loop is a failure, not completion.

Evidence

codeframe/core/react_agent.py:634

Acceptance criteria

  • Loop detection returns FAILED (or creates a blocker); the run result distinguishes "completed" from "terminated early due to loop".

Dependencies

None


Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-high-betaHigh priority - should fix before beta for best experiencepriority:mediumtype:bugSomething is broken and needs fixing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions