UAT: agents plan execute and agents plan apply JSON/YAML output missing spec-required envelope and structured sections #2561

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

Bug Report

What was tested

The agents plan execute and agents plan apply JSON and YAML output formats vs the specification.

Expected behavior (from spec)

Per docs/specification.md §agents plan execute, the JSON output must follow the standard CLI envelope format with command, status, exit_code, data, timing, messages fields.

For plan execute, the spec shows:

{
  "command": "plan execute",
  "status": "ok",
  "exit_code": 0,
  "data": { ... },
  "timing": { "started": "...", "duration_ms": ... },
  "messages": ["..."]
}

Similarly for plan apply, the spec requires the same envelope structure.

Actual behavior (from code)

Both commands use the same pattern in src/cleveragents/cli/commands/plan.py:

plan execute (lines 1899–1901):

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

plan apply (lines 2054–2056):

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

Both return a flat _plan_spec_dict() object without the required command/status/exit_code/data/timing/messages envelope.

Impact

  • JSON-based automation that parses agents plan execute --format json or agents plan apply --format json output will receive a completely different structure than documented
  • The messages field is absent, breaking standard envelope parsing
  • The timing field is absent, making it impossible to measure command duration from JSON output

Note

  • Issue #2474 covers the rich output format for plan apply
  • PR #1515 covers the rich output format for plan execute
  • This issue specifically covers the JSON/YAML output format for both commands, which is a separate concern

Code location

  • src/cleveragents/cli/commands/plan.py, function execute_plan, lines ~1899–1901
  • src/cleveragents/cli/commands/plan.py, function lifecycle_apply_plan, lines ~2054–2056

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

## Bug Report ### What was tested The `agents plan execute` and `agents plan apply` JSON and YAML output formats vs the specification. ### Expected behavior (from spec) Per `docs/specification.md` §`agents plan execute`, the JSON output must follow the standard CLI envelope format with `command`, `status`, `exit_code`, `data`, `timing`, `messages` fields. For `plan execute`, the spec shows: ```json { "command": "plan execute", "status": "ok", "exit_code": 0, "data": { ... }, "timing": { "started": "...", "duration_ms": ... }, "messages": ["..."] } ``` Similarly for `plan apply`, the spec requires the same envelope structure. ### Actual behavior (from code) Both commands use the same pattern in `src/cleveragents/cli/commands/plan.py`: **`plan execute`** (lines 1899–1901): ```python if fmt != OutputFormat.RICH.value: data = _plan_spec_dict(plan) console.print(format_output(data, fmt)) ``` **`plan apply`** (lines 2054–2056): ```python if fmt != OutputFormat.RICH.value: data = _plan_spec_dict(plan) console.print(format_output(data, fmt)) ``` Both return a flat `_plan_spec_dict()` object without the required `command/status/exit_code/data/timing/messages` envelope. ### Impact - JSON-based automation that parses `agents plan execute --format json` or `agents plan apply --format json` output will receive a completely different structure than documented - The `messages` field is absent, breaking standard envelope parsing - The `timing` field is absent, making it impossible to measure command duration from JSON output ### Note - Issue #2474 covers the rich output format for `plan apply` - PR #1515 covers the rich output format for `plan execute` - This issue specifically covers the JSON/YAML output format for both commands, which is a separate concern ### Code location - `src/cleveragents/cli/commands/plan.py`, function `execute_plan`, lines ~1899–1901 - `src/cleveragents/cli/commands/plan.py`, function `lifecycle_apply_plan`, lines ~2054–2056 --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.
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#2561
No description provided.