bug(cli): agents plan cancel rich output missing Plan Cancelled, Sandbox, Child Plans, and Recovery panels #9343

Open
opened 2026-04-14 15:17:04 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit Message: fix(cli): add Plan Cancelled, Sandbox, Child Plans, and Recovery panels to agents plan cancel output
  • Branch: fix/plan-cancel-missing-output-panels

Background and Context

The agents plan cancel [(--reason|-r) REASON] PLAN_ID command is specified in the product specification (§agents plan cancel, line 14175) to display four distinct Rich panels plus a footer.

Current Behavior

The current implementation (src/cleveragents/cli/commands/plan.py, cancel_plan() function at line 3121) renders only a simple inline text output:

✓ Plan cancelled: {plan.namespaced_name}
Reason: {reason}   (only if reason provided)

The following spec-required panels are completely absent:

  • Plan Cancelled panel (Plan ID, Phase, Reason, State, Cancelled At)
  • Sandbox panel (Status: preserved, Files Modified, Checkpoints)
  • Child Plans panel (Completed, Cancelled, Artifacts Preserved)
  • Recovery panel (recovery steps)

The footer should be ✓ OK Plan cancelled but the implementation outputs ✓ Plan cancelled: {name}.

Expected Behavior

Per specification §agents plan cancel (line 14175–14318), agents plan cancel PLAN_ID --reason "..." should render:

╭─ Plan Cancelled ─────────────────╮
│ Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J │
│ Phase: execute                   │
│ Reason: blocked on credentials   │
│ State: cancelled                 │
│ Cancelled At: 13:02:15           │
╰──────────────────────────────────╯

╭─ Sandbox ────────────────╮
│ Status: preserved        │
│ Files Modified: 3        │
│ Checkpoints: 2           │
╰──────────────────────────╯

╭─ Child Plans ─────────────╮
│ Completed: 1              │
│ Cancelled: 1              │
│ Artifacts Preserved: yes  │
╰───────────────────────────╯

╭─ Recovery ───────────────────────────────────────────╮
│ - Resolve credentials                                │
│ - Run agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J │
╰──────────────────────────────────────────────────────╯

✓ OK Plan cancelled

Acceptance Criteria

  • agents plan cancel PLAN_ID renders a Plan Cancelled panel with Plan ID, Phase, Reason (if provided), State, and Cancelled At timestamp
  • agents plan cancel PLAN_ID renders a Sandbox panel with Status (preserved), Files Modified, and Checkpoints
  • agents plan cancel PLAN_ID renders a Child Plans panel with Completed, Cancelled, and Artifacts Preserved fields
  • agents plan cancel PLAN_ID renders a Recovery panel with recovery steps
  • Footer reads ✓ OK Plan cancelled (not ✓ Plan cancelled: {name})
  • When --reason is omitted, the Reason field is absent from the Plan Cancelled panel
  • All existing plan_lifecycle_cli_coverage.feature BDD scenarios for plan cancel continue to pass
  • New BDD scenarios cover the missing panels

Supporting Information

  • Spec reference: docs/specification.md §agents plan cancel (lines 14175–14318)
  • Implementation: src/cleveragents/cli/commands/plan.pycancel_plan() at line 3121
  • Discovered by: UAT Test Pool — Plan Status and Errors CLI commands test (2026-04-14)
  • Test run: nox -s unit_tests -- features/plan_lifecycle_cli_coverage.feature — all 30 scenarios passed (tests check only for "Plan cancelled" text, not the full panel structure)

Subtasks

  • Refactor cancel_plan() to render Plan Cancelled, Sandbox, Child Plans, and Recovery panels
  • Change footer from ✓ Plan cancelled: {name} to ✓ OK Plan cancelled
  • Add BDD scenarios for the new panels in features/plan_lifecycle_cli_coverage.feature
  • Implement step definitions for the new scenarios
  • Run nox -s unit_tests -- features/plan_lifecycle_cli_coverage.feature and verify all pass
  • Run nox (all default sessions) and fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Commit Message**: `fix(cli): add Plan Cancelled, Sandbox, Child Plans, and Recovery panels to agents plan cancel output` - **Branch**: `fix/plan-cancel-missing-output-panels` --- ## Background and Context The `agents plan cancel [(--reason|-r) REASON] PLAN_ID` command is specified in the product specification (§agents plan cancel, line 14175) to display four distinct Rich panels plus a footer. ## Current Behavior The current implementation (`src/cleveragents/cli/commands/plan.py`, `cancel_plan()` function at line 3121) renders only a simple inline text output: ``` ✓ Plan cancelled: {plan.namespaced_name} Reason: {reason} (only if reason provided) ``` The following spec-required panels are **completely absent**: - **Plan Cancelled** panel (Plan ID, Phase, Reason, State, Cancelled At) - **Sandbox** panel (Status: preserved, Files Modified, Checkpoints) - **Child Plans** panel (Completed, Cancelled, Artifacts Preserved) - **Recovery** panel (recovery steps) The footer should be `✓ OK Plan cancelled` but the implementation outputs `✓ Plan cancelled: {name}`. ## Expected Behavior Per specification §agents plan cancel (line 14175–14318), `agents plan cancel PLAN_ID --reason "..."` should render: ``` ╭─ Plan Cancelled ─────────────────╮ │ Plan: 01HXM8C2ZK4Q7C2B3F2R4VYV6J │ │ Phase: execute │ │ Reason: blocked on credentials │ │ State: cancelled │ │ Cancelled At: 13:02:15 │ ╰──────────────────────────────────╯ ╭─ Sandbox ────────────────╮ │ Status: preserved │ │ Files Modified: 3 │ │ Checkpoints: 2 │ ╰──────────────────────────╯ ╭─ Child Plans ─────────────╮ │ Completed: 1 │ │ Cancelled: 1 │ │ Artifacts Preserved: yes │ ╰───────────────────────────╯ ╭─ Recovery ───────────────────────────────────────────╮ │ - Resolve credentials │ │ - Run agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J │ ╰──────────────────────────────────────────────────────╯ ✓ OK Plan cancelled ``` ## Acceptance Criteria - [ ] `agents plan cancel PLAN_ID` renders a **Plan Cancelled** panel with Plan ID, Phase, Reason (if provided), State, and Cancelled At timestamp - [ ] `agents plan cancel PLAN_ID` renders a **Sandbox** panel with Status (preserved), Files Modified, and Checkpoints - [ ] `agents plan cancel PLAN_ID` renders a **Child Plans** panel with Completed, Cancelled, and Artifacts Preserved fields - [ ] `agents plan cancel PLAN_ID` renders a **Recovery** panel with recovery steps - [ ] Footer reads `✓ OK Plan cancelled` (not `✓ Plan cancelled: {name}`) - [ ] When `--reason` is omitted, the Reason field is absent from the Plan Cancelled panel - [ ] All existing `plan_lifecycle_cli_coverage.feature` BDD scenarios for plan cancel continue to pass - [ ] New BDD scenarios cover the missing panels ## Supporting Information - **Spec reference**: `docs/specification.md` §agents plan cancel (lines 14175–14318) - **Implementation**: `src/cleveragents/cli/commands/plan.py` — `cancel_plan()` at line 3121 - **Discovered by**: UAT Test Pool — Plan Status and Errors CLI commands test (2026-04-14) - **Test run**: `nox -s unit_tests -- features/plan_lifecycle_cli_coverage.feature` — all 30 scenarios passed (tests check only for "Plan cancelled" text, not the full panel structure) ## Subtasks - [ ] Refactor `cancel_plan()` to render Plan Cancelled, Sandbox, Child Plans, and Recovery panels - [ ] Change footer from `✓ Plan cancelled: {name}` to `✓ OK Plan cancelled` - [ ] Add BDD scenarios for the new panels in `features/plan_lifecycle_cli_coverage.feature` - [ ] Implement step definitions for the new scenarios - [ ] Run `nox -s unit_tests -- features/plan_lifecycle_cli_coverage.feature` and verify all pass - [ ] Run `nox` (all default sessions) and fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
HAL9000 added this to the v3.3.0 milestone 2026-04-14 15:17:51 +00:00
Author
Owner

Triage: Verified [AUTO-OWNR-1]

Valid bug: agents plan cancel rich output is missing 4 spec-required panels (Plan Cancelled, Sandbox, Child Plans, Recovery) and uses the wrong footer text. The current implementation renders only a simple inline text message instead of the structured panel output defined in the spec (§agents plan cancel, lines 14175-14318).

Assigning to v3.3.0 (Corrections + Subplans + Checkpoints) as plan cancel is a core M4 command. Priority Medium — output format issue, the command still functions.

MoSCoW: Should Have — spec-compliant output panels are important for user experience and provide critical information about sandbox state and recovery steps.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Triage: Verified** [AUTO-OWNR-1] Valid bug: `agents plan cancel` rich output is missing 4 spec-required panels (Plan Cancelled, Sandbox, Child Plans, Recovery) and uses the wrong footer text. The current implementation renders only a simple inline text message instead of the structured panel output defined in the spec (§agents plan cancel, lines 14175-14318). Assigning to **v3.3.0** (Corrections + Subplans + Checkpoints) as plan cancel is a core M4 command. Priority **Medium** — output format issue, the command still functions. MoSCoW: **Should Have** — spec-compliant output panels are important for user experience and provide critical information about sandbox state and recovery steps. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#9343
No description provided.