UAT: agents plan status --format json output does not match spec envelope #5027

Closed
opened 2026-04-09 00:49:19 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Plan Lifecycle — agents plan status

Summary

agents plan status <PLAN_ID> --format json returns a raw plan data dict instead of the spec-required JSON envelope. The output is missing the command, status, exit_code, timing, and messages top-level fields, and the data section is missing spec-required fields like action, project, automation, attempt, progress, execution, and cost.

Expected Behavior (from spec)

Per docs/specification.md §agents plan status, the JSON output must be:

{
  "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

In src/cleveragents/cli/commands/plan.py, the plan_status command (lines 2309–2395) calls _plan_spec_dict(plan) and passes it directly to format_output. The _plan_spec_dict function returns a dict with fields like:

  • plan_id, namespaced_name, phase, processing_state, state, project_links, arguments, automation_profile, action_name, description, definition_of_done, strategy_actor, execution_actor, created_at, updated_at, is_terminal

This is missing:

  1. Top-level envelope: No command, status, exit_code, timing, messages fields
  2. action field: The spec uses action but the implementation uses action_name
  3. project field: The spec uses project (string) but the implementation uses project_links (list of objects)
  4. automation field: The spec uses automation (string profile name) but the implementation uses automation_profile (object with profile_name)
  5. attempt field: Missing entirely
  6. progress array: Missing entirely (spec requires Strategize/Execute/Apply step statuses)
  7. execution section: Missing entirely (sandbox, tool_calls, files_modified, child_plans, checkpoints)
  8. cost section: Missing entirely (tokens_used, cost_so_far, estimated)

Code Location

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

  • plan_status function (lines 2309–2395)
  • _plan_spec_dict function (lines 223–300)

Impact

Any programmatic consumer of agents plan status --format json will receive a non-spec-compliant response, breaking integrations and CI/CD pipelines that rely on the documented JSON schema.


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

## Bug Report **Feature Area:** Plan Lifecycle — `agents plan status` ### Summary `agents plan status <PLAN_ID> --format json` returns a raw plan data dict instead of the spec-required JSON envelope. The output is missing the `command`, `status`, `exit_code`, `timing`, and `messages` top-level fields, and the `data` section is missing spec-required fields like `action`, `project`, `automation`, `attempt`, `progress`, `execution`, and `cost`. ### Expected Behavior (from spec) Per `docs/specification.md` §agents plan status, the JSON output must be: ```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 In `src/cleveragents/cli/commands/plan.py`, the `plan_status` command (lines 2309–2395) calls `_plan_spec_dict(plan)` and passes it directly to `format_output`. The `_plan_spec_dict` function returns a dict with fields like: - `plan_id`, `namespaced_name`, `phase`, `processing_state`, `state`, `project_links`, `arguments`, `automation_profile`, `action_name`, `description`, `definition_of_done`, `strategy_actor`, `execution_actor`, `created_at`, `updated_at`, `is_terminal` This is missing: 1. **Top-level envelope**: No `command`, `status`, `exit_code`, `timing`, `messages` fields 2. **`action` field**: The spec uses `action` but the implementation uses `action_name` 3. **`project` field**: The spec uses `project` (string) but the implementation uses `project_links` (list of objects) 4. **`automation` field**: The spec uses `automation` (string profile name) but the implementation uses `automation_profile` (object with `profile_name`) 5. **`attempt` field**: Missing entirely 6. **`progress` array**: Missing entirely (spec requires Strategize/Execute/Apply step statuses) 7. **`execution` section**: Missing entirely (sandbox, tool_calls, files_modified, child_plans, checkpoints) 8. **`cost` section**: Missing entirely (tokens_used, cost_so_far, estimated) ### Code Location `src/cleveragents/cli/commands/plan.py`: - `plan_status` function (lines 2309–2395) - `_plan_spec_dict` function (lines 223–300) ### Impact Any programmatic consumer of `agents plan status --format json` will receive a non-spec-compliant response, breaking integrations and CI/CD pipelines that rely on the documented JSON schema. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Closing as duplicate of #4842 — both issues report the same problem: agents plan status --format json output missing spec-required fields.


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

Closing as duplicate of #4842 — both issues report the same problem: `agents plan status --format json` output missing spec-required fields. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
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#5027
No description provided.