UAT: agents plan status errored-plan output missing spec-required recovery hint message — [ERROR] Plan errored — use 'agents plan prompt' to resume or 'agents plan cancel' to abort #2548

Open
opened 2026-04-03 18:51:41 +00:00 by freemo · 2 comments
Owner

Bug Report

What was tested

The agents plan status rich output for errored plans vs the specification.

Expected behavior (from spec)

Per docs/specification.md §agents plan status (errored plan example), the output must end with a recovery hint message:

Rich output:

✗ ERROR  Plan errored — use `agents plan prompt` to resume or `agents plan cancel` to abort

Plain output:

[ERROR] Plan errored -- use `agents plan prompt` to resume or `agents plan cancel` to abort

JSON output:

{
  "status": "error",
  "exit_code": 1,
  "messages": ["Plan errored — use `agents plan prompt` to resume or `agents plan cancel` to abort"]
}

The spec also requires:

  • "status": "error" (not "ok") in JSON output for errored plans
  • "exit_code": 1 (not 0) for errored plans
  • A structured "error" object in data with message, tool, step, checkpoint, recoverable fields

Actual behavior (from code)

In src/cleveragents/cli/commands/plan.py (function plan_status, lines 2161–2179), the command calls _print_lifecycle_plan(plan, title="Plan Status") which shows the error message if present (line 1386–1387):

if plan.error_message:
    details += f"\n[bold red]Error:[/bold red] {plan.error_message}"

But there is no recovery hint message appended after the panel. The function simply calls _print_lifecycle_plan() and returns — no [ERROR] status line, no recovery hint, no exit_code: 1 for errored plans.

Impact

  • Users who run agents plan status on an errored plan get the error message but no guidance on how to recover
  • The spec explicitly requires the recovery hint to guide users toward agents plan prompt or agents plan cancel
  • JSON consumers cannot distinguish errored plans from successful ones (both return exit_code: 0)
  • Automated monitoring scripts cannot detect plan failures via exit code

Code location

src/cleveragents/cli/commands/plan.py, function plan_status, lines ~2161–2179.

Fix

After _print_lifecycle_plan(), check if the plan is errored and print the recovery hint:

if plan.is_errored:
    console.print(
        f"\n[red bold]✗ ERROR[/red bold] Plan errored — "
        f"use `agents plan prompt` to resume or `agents plan cancel` to abort"
    )
    raise typer.Exit(1)

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

## Bug Report ### What was tested The `agents plan status` rich output for errored plans vs the specification. ### Expected behavior (from spec) Per `docs/specification.md` §`agents plan status` (errored plan example), the output must end with a recovery hint message: **Rich output:** ``` ✗ ERROR Plan errored — use `agents plan prompt` to resume or `agents plan cancel` to abort ``` **Plain output:** ``` [ERROR] Plan errored -- use `agents plan prompt` to resume or `agents plan cancel` to abort ``` **JSON output:** ```json { "status": "error", "exit_code": 1, "messages": ["Plan errored — use `agents plan prompt` to resume or `agents plan cancel` to abort"] } ``` The spec also requires: - `"status": "error"` (not `"ok"`) in JSON output for errored plans - `"exit_code": 1` (not `0`) for errored plans - A structured `"error"` object in `data` with `message`, `tool`, `step`, `checkpoint`, `recoverable` fields ### Actual behavior (from code) In `src/cleveragents/cli/commands/plan.py` (function `plan_status`, lines 2161–2179), the command calls `_print_lifecycle_plan(plan, title="Plan Status")` which shows the error message if present (line 1386–1387): ```python if plan.error_message: details += f"\n[bold red]Error:[/bold red] {plan.error_message}" ``` But there is **no recovery hint message** appended after the panel. The function simply calls `_print_lifecycle_plan()` and returns — no `[ERROR]` status line, no recovery hint, no `exit_code: 1` for errored plans. ### Impact - Users who run `agents plan status` on an errored plan get the error message but no guidance on how to recover - The spec explicitly requires the recovery hint to guide users toward `agents plan prompt` or `agents plan cancel` - JSON consumers cannot distinguish errored plans from successful ones (both return `exit_code: 0`) - Automated monitoring scripts cannot detect plan failures via exit code ### Code location `src/cleveragents/cli/commands/plan.py`, function `plan_status`, lines ~2161–2179. ### Fix After `_print_lifecycle_plan()`, check if the plan is errored and print the recovery hint: ```python if plan.is_errored: console.print( f"\n[red bold]✗ ERROR[/red bold] Plan errored — " f"use `agents plan prompt` to resume or `agents plan cancel` to abort" ) raise typer.Exit(1) ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.5.0 milestone 2026-04-05 05:06:34 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.5.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#2548
No description provided.