UAT: Top-level --format flag not propagated to plan subcommands — must pass --format twice #4568

Closed
opened 2026-04-08 15:33:38 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Plan lifecycle — CLI output format flag
Severity: Medium — spec-defined usage pattern broken
Discovered by: UAT tester (uat-tester-plan-lifecycle)


Summary

The spec defines --format as a top-level global flag (agents --format json plan list), but the implementation ignores the top-level --format flag for plan subcommands. Users must pass --format as a subcommand option instead (agents plan list --format json).


Expected Behavior (from spec)

The spec shows the --format flag as a top-level option:

agents|cleveragents  [--data-dir <DATA_PATH>] [--config-path <CONFIG_PATH>]
                     [--format (rich|color|table|plain|json|yaml)]
                     ...
                     <COMMAND> [<ARGS>...]

Example from spec (line 12130):

$ agents --format table plan list --phase execute

This should produce table output.


Actual Behavior

Running agents --format json plan list produces rich output (ignores top-level --format):

                                     Plans                                      
┏━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━┓
┃ ID     ┃ Name   ┃ Phase  ┃ State  ┃ Action ┃ ...

Running agents plan list --format json (subcommand flag) produces JSON output correctly.


Steps to Reproduce

# This should produce JSON but produces rich output:
agents --format json plan list

# This works correctly:
agents plan list --format json

Code Location

src/cleveragents/cli/commands/plan.pylist_plans command

The plan list command has its own --format/-f option but does not read the top-level --format context option. The top-level format flag is set on the main Typer app but not passed down to subcommand handlers.


Impact

Users following the spec examples (which use agents --format json plan list) will get unexpected rich output instead of JSON. This breaks any automation that follows the spec's documented usage pattern.


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

## Bug Report **Feature Area:** Plan lifecycle — CLI output format flag **Severity:** Medium — spec-defined usage pattern broken **Discovered by:** UAT tester (uat-tester-plan-lifecycle) --- ## Summary The spec defines `--format` as a top-level global flag (`agents --format json plan list`), but the implementation ignores the top-level `--format` flag for `plan` subcommands. Users must pass `--format` as a subcommand option instead (`agents plan list --format json`). --- ## Expected Behavior (from spec) The spec shows the `--format` flag as a top-level option: ``` agents|cleveragents [--data-dir <DATA_PATH>] [--config-path <CONFIG_PATH>] [--format (rich|color|table|plain|json|yaml)] ... <COMMAND> [<ARGS>...] ``` Example from spec (line 12130): ```bash $ agents --format table plan list --phase execute ``` This should produce table output. --- ## Actual Behavior Running `agents --format json plan list` produces **rich output** (ignores top-level `--format`): ``` Plans ┏━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━┓ ┃ ID ┃ Name ┃ Phase ┃ State ┃ Action ┃ ... ``` Running `agents plan list --format json` (subcommand flag) produces **JSON output** correctly. --- ## Steps to Reproduce ```bash # This should produce JSON but produces rich output: agents --format json plan list # This works correctly: agents plan list --format json ``` --- ## Code Location `src/cleveragents/cli/commands/plan.py` — `list_plans` command The `plan list` command has its own `--format/-f` option but does not read the top-level `--format` context option. The top-level format flag is set on the main Typer app but not passed down to subcommand handlers. --- ## Impact Users following the spec examples (which use `agents --format json plan list`) will get unexpected rich output instead of JSON. This breaks any automation that follows the spec's documented usage pattern. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Closing as duplicate of #3998. Both issues describe the same bug: the global --format flag is not propagated to subcommands. Issue #3998 covers all subcommands including plan subcommands, and has a detailed fix plan.


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

Closing as duplicate of #3998. Both issues describe the same bug: the global `--format` flag is not propagated to subcommands. Issue #3998 covers all subcommands including `plan` subcommands, and has a detailed fix plan. --- **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#4568
No description provided.