UAT: agents plan status JSON/YAML output uses flat _plan_spec_dict instead of spec-required structured data with progress/timing/execution/cost fields #6473

Open
opened 2026-04-09 21:07:46 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area

Plan Lifecycle — agents plan status JSON/YAML output

Spec Reference

docs/specification.md §13660–13739 (agents plan status JSON/YAML output)

Expected Behavior (from spec)

The spec defines the following JSON output structure for agents plan status <PLAN_ID>:

{
  "command": "plan status",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "plan_id": "01HXM8C2ZK4Q7C2B3F2R4VYV6J",
    "phase": "execute",
    "state": "processing",
    "action": "local/code-coverage",
    "project": "local/api-service",
    "automation": "review",
    "attempt": 1,
    "progress": [
      { "step": "Strategize", "status": "done" },
      { "step": "Execute", "status": "running" },
      { "step": "Apply", "status": "queued" }
    ],
    "timing": {
      "started": "12:57:01",
      "elapsed": "00:01:12",
      "eta": "00:03:45"
    },
    "execution": {
      "sandbox": "git_worktree",
      "tool_calls": 8,
      "files_modified": 3,
      "child_plans": "1/2 complete",
      "checkpoints": 2
    },
    "cost": {
      "tokens_used": 12420,
      "cost_so_far": 0.041,
      "estimated": 0.085
    }
  },
  "timing": { "started": "2026-02-08T12:57:01Z", "duration_ms": 120 },
  "messages": ["Status refreshed"]
}

Actual Behavior

The implementation in plan_status() (src/cleveragents/cli/commands/plan.py, lines 2733–2735):

if fmt != OutputFormat.RICH.value:
    data = _plan_spec_dict(plan)
    console.print(format_output(data, fmt))

_plan_spec_dict(plan) returns a flat plan dict — but missing the spec-required structured fields:

  • data.progress (list of phase steps with status)
  • data.timing (started, elapsed, eta)
  • data.execution (sandbox, tool_calls, files_modified, child_plans, checkpoints)
  • data.cost (tokens_used, cost_so_far, estimated)
  • data.attempt (plan attempt number)
  • data.automation (automation profile name, not the full profile object)
  • data.project (single project name, not project_links list)
  • data.action (action name, not action_name)
  • command field is empty string "" instead of "plan status"

Code Location

src/cleveragents/cli/commands/plan.py:

  • Lines 2733–2735: plan_status() non-rich output path — uses _plan_spec_dict() instead of spec-required structured dict

Steps to Reproduce

agents --format json plan status <PLAN_ID>

Observe: flat plan dict without progress, timing, execution, cost fields.

Severity

Medium — downstream automation tools that parse agents --format json plan status output will fail to find the structured fields defined in the spec.


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

## Bug Report ### Feature Area Plan Lifecycle — `agents plan status` JSON/YAML output ### Spec Reference `docs/specification.md` §13660–13739 (agents plan status JSON/YAML output) ### Expected Behavior (from spec) The spec defines the following JSON output structure for `agents plan status <PLAN_ID>`: ```json { "command": "plan status", "status": "ok", "exit_code": 0, "data": { "plan_id": "01HXM8C2ZK4Q7C2B3F2R4VYV6J", "phase": "execute", "state": "processing", "action": "local/code-coverage", "project": "local/api-service", "automation": "review", "attempt": 1, "progress": [ { "step": "Strategize", "status": "done" }, { "step": "Execute", "status": "running" }, { "step": "Apply", "status": "queued" } ], "timing": { "started": "12:57:01", "elapsed": "00:01:12", "eta": "00:03:45" }, "execution": { "sandbox": "git_worktree", "tool_calls": 8, "files_modified": 3, "child_plans": "1/2 complete", "checkpoints": 2 }, "cost": { "tokens_used": 12420, "cost_so_far": 0.041, "estimated": 0.085 } }, "timing": { "started": "2026-02-08T12:57:01Z", "duration_ms": 120 }, "messages": ["Status refreshed"] } ``` ### Actual Behavior The implementation in `plan_status()` (`src/cleveragents/cli/commands/plan.py`, lines 2733–2735): ```python if fmt != OutputFormat.RICH.value: data = _plan_spec_dict(plan) console.print(format_output(data, fmt)) ``` `_plan_spec_dict(plan)` returns a flat plan dict — but **missing** the spec-required structured fields: - ❌ `data.progress` (list of phase steps with status) - ❌ `data.timing` (started, elapsed, eta) - ❌ `data.execution` (sandbox, tool_calls, files_modified, child_plans, checkpoints) - ❌ `data.cost` (tokens_used, cost_so_far, estimated) - ❌ `data.attempt` (plan attempt number) - ❌ `data.automation` (automation profile name, not the full profile object) - ❌ `data.project` (single project name, not `project_links` list) - ❌ `data.action` (action name, not `action_name`) - ❌ `command` field is empty string `""` instead of `"plan status"` ### Code Location `src/cleveragents/cli/commands/plan.py`: - Lines 2733–2735: `plan_status()` non-rich output path — uses `_plan_spec_dict()` instead of spec-required structured dict ### Steps to Reproduce ```bash agents --format json plan status <PLAN_ID> ``` Observe: flat plan dict without `progress`, `timing`, `execution`, `cost` fields. ### Severity Medium — downstream automation tools that parse `agents --format json plan status` output will fail to find the structured fields defined in the spec. --- **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#6473
No description provided.