UAT: plan execute auto-discovery does not include Strategize/PROCESSING state plans, causing stuck plans to be invisible #5426

Closed
opened 2026-04-09 06:39:18 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: Plan Lifecycle Core — agents plan execute (auto-discovery)
Severity: Priority/Backlog (edge case — only affects plans stuck in PROCESSING state)

What Was Tested

Code-level analysis of agents plan execute (without plan_id) auto-discovery logic against the specification.

Expected Behavior (from spec)

When agents plan execute is run without a plan ID, it should auto-discover all plans that are eligible for execution, including plans that were interrupted mid-processing (Strategize/PROCESSING state).

Actual Behavior

The auto-discovery logic at src/cleveragents/cli/commands/plan.py lines 1992–1998 only includes plans in QUEUED or COMPLETE state for Strategize, and QUEUED for Execute:

# plan.py lines 1992-1998 — MISSING PROCESSING STATE:
eligible = [
    p
    for p in plans_strat
    if p.state in (ProcessingState.QUEUED, ProcessingState.COMPLETE)
] + [p for p in plans_exec if p.state == ProcessingState.QUEUED]

Plans in Strategize/PROCESSING state (e.g., plans that were interrupted mid-strategize) are NOT included in the eligible list. This means:

  1. If a plan gets stuck in Strategize/PROCESSING (e.g., due to a crash or timeout), agents plan execute without a plan_id will say "No plans ready for execution"
  2. The user must know the plan_id to explicitly run agents plan execute <plan_id>
  3. The explicit path DOES handle PROCESSING state (line 2060-2063 checks for QUEUED or PROCESSING)

Impact

  • Plans stuck in Strategize/PROCESSING are invisible to auto-discovery
  • Users get confusing "No plans ready for execution" message when they have an active plan
  • Inconsistency: explicit plan execute <id> handles PROCESSING state but auto-discovery doesn't

Code Location

  • Bug: src/cleveragents/cli/commands/plan.py, lines 1994–1998 (the auto-discovery eligible filter)
  • Fix: Add ProcessingState.PROCESSING to the Strategize eligible states:
    eligible = [
        p
        for p in plans_strat
        if p.state in (ProcessingState.QUEUED, ProcessingState.COMPLETE, ProcessingState.PROCESSING)
    ] + [p for p in plans_exec if p.state == ProcessingState.QUEUED]
    

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area**: Plan Lifecycle Core — `agents plan execute` (auto-discovery) **Severity**: Priority/Backlog (edge case — only affects plans stuck in PROCESSING state) ## What Was Tested Code-level analysis of `agents plan execute` (without plan_id) auto-discovery logic against the specification. ## Expected Behavior (from spec) When `agents plan execute` is run without a plan ID, it should auto-discover all plans that are eligible for execution, including plans that were interrupted mid-processing (Strategize/PROCESSING state). ## Actual Behavior The auto-discovery logic at `src/cleveragents/cli/commands/plan.py` lines 1992–1998 only includes plans in `QUEUED` or `COMPLETE` state for Strategize, and `QUEUED` for Execute: ```python # plan.py lines 1992-1998 — MISSING PROCESSING STATE: eligible = [ p for p in plans_strat if p.state in (ProcessingState.QUEUED, ProcessingState.COMPLETE) ] + [p for p in plans_exec if p.state == ProcessingState.QUEUED] ``` Plans in `Strategize/PROCESSING` state (e.g., plans that were interrupted mid-strategize) are NOT included in the eligible list. This means: 1. If a plan gets stuck in `Strategize/PROCESSING` (e.g., due to a crash or timeout), `agents plan execute` without a plan_id will say "No plans ready for execution" 2. The user must know the plan_id to explicitly run `agents plan execute <plan_id>` 3. The explicit path DOES handle `PROCESSING` state (line 2060-2063 checks for `QUEUED` or `PROCESSING`) ## Impact - Plans stuck in `Strategize/PROCESSING` are invisible to auto-discovery - Users get confusing "No plans ready for execution" message when they have an active plan - Inconsistency: explicit `plan execute <id>` handles PROCESSING state but auto-discovery doesn't ## Code Location - **Bug**: `src/cleveragents/cli/commands/plan.py`, lines 1994–1998 (the auto-discovery eligible filter) - **Fix**: Add `ProcessingState.PROCESSING` to the Strategize eligible states: ```python eligible = [ p for p in plans_strat if p.state in (ProcessingState.QUEUED, ProcessingState.COMPLETE, ProcessingState.PROCESSING) ] + [p for p in plans_exec if p.state == ProcessingState.QUEUED] ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 06:49:36 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Member

dup with #4372

dup with #4372
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#5426
No description provided.