UAT: agents plan cancel JSON/YAML output missing spec-required command envelope and uses wrong data structure #6280

Open
opened 2026-04-09 19:48:09 +00:00 by HAL9000 · 0 comments
Owner

Spec Reference

Spec §agents plan cancel (lines 14256–14288) defines the JSON output envelope:

{
  "command": "plan cancel",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "plan_id": "...",
    "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": true},
    "recovery": ["Resolve credentials", "Run agents plan execute ..."]
  },
  "timing": {"started": "...", "duration_ms": 340},
  "messages": ["Plan cancelled"]
}

Expected Behavior

agents plan cancel <PLAN_ID> --format json should return the full spec-required JSON envelope with:

  • Top-level command, status, exit_code, data, timing, messages keys
  • data.reason (cancellation reason)
  • data.cancelled_at (timestamp)
  • data.sandbox (status, files_modified, checkpoints)
  • data.child_plans (completed, cancelled, artifacts_preserved)
  • data.recovery (suggested recovery steps)

Actual Behavior

The implementation uses _plan_spec_dict(plan) plus cancel_reason (see src/cleveragents/cli/commands/plan.py lines 3154–3158) which returns a flat dict without the command envelope. Missing: command, status, exit_code, timing, messages, cancelled_at, sandbox, child_plans, recovery.

Code Location

  • src/cleveragents/cli/commands/plan.py lines 3154–3158 (cancel_plan, non-rich output)

Steps to Reproduce

agents plan cancel <PLAN_ID> --reason "test" --format json

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

## Spec Reference Spec §agents plan cancel (lines 14256–14288) defines the JSON output envelope: ```json { "command": "plan cancel", "status": "ok", "exit_code": 0, "data": { "plan_id": "...", "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": true}, "recovery": ["Resolve credentials", "Run agents plan execute ..."] }, "timing": {"started": "...", "duration_ms": 340}, "messages": ["Plan cancelled"] } ``` ## Expected Behavior `agents plan cancel <PLAN_ID> --format json` should return the full spec-required JSON envelope with: - Top-level `command`, `status`, `exit_code`, `data`, `timing`, `messages` keys - `data.reason` (cancellation reason) - `data.cancelled_at` (timestamp) - `data.sandbox` (status, files_modified, checkpoints) - `data.child_plans` (completed, cancelled, artifacts_preserved) - `data.recovery` (suggested recovery steps) ## Actual Behavior The implementation uses `_plan_spec_dict(plan)` plus `cancel_reason` (see `src/cleveragents/cli/commands/plan.py` lines 3154–3158) which returns a flat dict without the command envelope. Missing: `command`, `status`, `exit_code`, `timing`, `messages`, `cancelled_at`, `sandbox`, `child_plans`, `recovery`. ## Code Location - `src/cleveragents/cli/commands/plan.py` lines 3154–3158 (cancel_plan, non-rich output) ## Steps to Reproduce ```bash agents plan cancel <PLAN_ID> --reason "test" --format json ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
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#6280
No description provided.