UAT: agents session tell missing --format option and rich output structure diverges from spec #6307

Open
opened 2026-04-09 20:08:37 +00:00 by HAL9000 · 0 comments
Owner

Summary

agents session tell has two related gaps:

  1. No --format option — the command cannot produce machine-readable JSON/YAML output at all.
  2. Rich output structure is wrong — the command prints user: <prompt> / assistant: <response> instead of the spec-required "Plan Request", "Commands Executed", "Result", and "Usage" panels.

Spec Reference

docs/specification.md §agents session tell (around lines 2235–2391) defines:

Command signature: agents session tell --session <SESSION_ID> [--actor <ACTOR>] [--stream] <PROMPT>

Rich output (spec lines 2261–2289):

╭─ Plan Request ──────────────────────────────────────────╮
│ Actor: local/orchestrator                               │
│ Session: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z                    │
│ Automation: review                                      │
│ Prompt: Create an action to refresh dependency locks... │
╰─────────────────────────────────────────────────────────╯

╭─ Commands Executed ───────────────────────────────────────╮
│ - agents action create --config ./actions/refresh-locks.yaml │
│ …                                                         │
╰───────────────────────────────────────────────────────────╯

╭─ Result ──────────────────────╮
│ Action: local/refresh-locks   │
│ Project: local/platform       │
│ Resource: local/platform-repo │
╰───────────────────────────────╯

╭─ Usage ─────────────────────╮
│ Input Tokens: 1,842         │
│ Output Tokens: 624          │
│ Cost: $0.0094               │
│ Duration: 3.2s              │
│ Tool Calls: 3               │
╰─────────────────────────────╯

✓ OK Orchestrator completed 3 commands

JSON output (spec lines 2326–2357):

{
  "command": "agents session tell \"...\" --session 01HXM2A6K1P2E9Q9D4GQ7J4S7Z",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "plan_request": {
      "actor": "local/orchestrator",
      "session": "01HXM2A6K1P2E9Q9D4GQ7J4S7Z",
      "automation": "review",
      "prompt": "..."
    },
    "commands_executed": [ "agents action create ...", "..." ],
    "result": { "action": "local/refresh-locks", "project": "local/platform", "resource": "local/platform-repo" },
    "usage": {
      "input_tokens": 1842,
      "output_tokens": 624,
      "cost": "$0.0094",
      "duration_s": 3.2,
      "tool_calls": 3
    }
  },
  "timing": { "duration_ms": 3200 },
  "messages": [{ "level": "ok", "text": "Orchestrator completed 3 commands" }]
}

Code Location

File: src/cleveragents/cli/commands/session.py
Lines 792–860 — the tell command:

@app.command()
def tell(
    prompt: Annotated[str, typer.Argument(...)],
    session_id: Annotated[str, typer.Option("--session", ...)],
    actor: Annotated[str | None, typer.Option("--actor", ...)],
    stream: Annotated[bool, typer.Option("--stream", ...)],
) -> None:

Gap 1 (lines 792–810): No --format option is declared. The fmt parameter is completely absent from the function signature.

Gap 2 (lines 843–853): The rich output path renders only two bare lines:

console.print(f"[dim]user:[/dim] {escape(prompt)}")
console.print(f"[cyan]assistant:[/cyan] {escape(assistant_content)}")

There are no "Plan Request", "Commands Executed", "Result", or "Usage" Panel objects rendered.

Gap 3 (lines 825–841): The stub implementation only echoes "Acknowledged: <prompt>" — no commands_executed, result, or usage data is ever computed. This means even if the format option were added, there is no data to put in the output.

Steps to Reproduce

SESSION=$(agents session create --format json | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['session_id'])")
agents session tell --session "$SESSION" "Plan a feature"
# No Plan Request / Commands Executed / Result / Usage panels appear
agents session tell --session "$SESSION" --format json "Plan a feature"
# Error: no such option --format

Expected Result

  1. --format json option is accepted.
  2. Rich output renders four spec-required panels: Plan Request, Commands Executed, Result, Usage.
  3. JSON output produces the spec envelope with plan_request, commands_executed, result, usage keys.

Actual Result

  1. --format option does not exist; attempting to use it raises a CLI error.
  2. Rich output renders user: <prompt> and assistant: Acknowledged: <prompt> — no panels at all.
  3. No JSON output path exists.

Additional Notes

  • The stub actor execution (lines 831–841) is a known M3 limitation commented in-code. The output structure gap (panels + format option) should be fixed independently of the actor stub.
  • For the streaming path (lines 843–848), the spec (lines 2393–2423) shows a "Session" panel (ID, Actor, Mode), then streamed text, then a "Usage" panel.
  • The --format option should follow the same pattern as session list / session show: fmt: str = "rich".

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

## Summary `agents session tell` has two related gaps: 1. **No `--format` option** — the command cannot produce machine-readable JSON/YAML output at all. 2. **Rich output structure is wrong** — the command prints `user: <prompt>` / `assistant: <response>` instead of the spec-required "Plan Request", "Commands Executed", "Result", and "Usage" panels. ## Spec Reference `docs/specification.md` §agents session tell (around lines 2235–2391) defines: **Command signature**: `agents session tell --session <SESSION_ID> [--actor <ACTOR>] [--stream] <PROMPT>` **Rich output** (spec lines 2261–2289): ``` ╭─ Plan Request ──────────────────────────────────────────╮ │ Actor: local/orchestrator │ │ Session: 01HXM2A6K1P2E9Q9D4GQ7J4S7Z │ │ Automation: review │ │ Prompt: Create an action to refresh dependency locks... │ ╰─────────────────────────────────────────────────────────╯ ╭─ Commands Executed ───────────────────────────────────────╮ │ - agents action create --config ./actions/refresh-locks.yaml │ │ … │ ╰───────────────────────────────────────────────────────────╯ ╭─ Result ──────────────────────╮ │ Action: local/refresh-locks │ │ Project: local/platform │ │ Resource: local/platform-repo │ ╰───────────────────────────────╯ ╭─ Usage ─────────────────────╮ │ Input Tokens: 1,842 │ │ Output Tokens: 624 │ │ Cost: $0.0094 │ │ Duration: 3.2s │ │ Tool Calls: 3 │ ╰─────────────────────────────╯ ✓ OK Orchestrator completed 3 commands ``` **JSON output** (spec lines 2326–2357): ```json { "command": "agents session tell \"...\" --session 01HXM2A6K1P2E9Q9D4GQ7J4S7Z", "status": "ok", "exit_code": 0, "data": { "plan_request": { "actor": "local/orchestrator", "session": "01HXM2A6K1P2E9Q9D4GQ7J4S7Z", "automation": "review", "prompt": "..." }, "commands_executed": [ "agents action create ...", "..." ], "result": { "action": "local/refresh-locks", "project": "local/platform", "resource": "local/platform-repo" }, "usage": { "input_tokens": 1842, "output_tokens": 624, "cost": "$0.0094", "duration_s": 3.2, "tool_calls": 3 } }, "timing": { "duration_ms": 3200 }, "messages": [{ "level": "ok", "text": "Orchestrator completed 3 commands" }] } ``` ## Code Location **File**: `src/cleveragents/cli/commands/session.py` **Lines 792–860** — the `tell` command: ```python @app.command() def tell( prompt: Annotated[str, typer.Argument(...)], session_id: Annotated[str, typer.Option("--session", ...)], actor: Annotated[str | None, typer.Option("--actor", ...)], stream: Annotated[bool, typer.Option("--stream", ...)], ) -> None: ``` **Gap 1** (lines 792–810): No `--format` option is declared. The `fmt` parameter is completely absent from the function signature. **Gap 2** (lines 843–853): The rich output path renders only two bare lines: ```python console.print(f"[dim]user:[/dim] {escape(prompt)}") console.print(f"[cyan]assistant:[/cyan] {escape(assistant_content)}") ``` There are no "Plan Request", "Commands Executed", "Result", or "Usage" `Panel` objects rendered. **Gap 3** (lines 825–841): The stub implementation only echoes `"Acknowledged: <prompt>"` — no `commands_executed`, `result`, or `usage` data is ever computed. This means even if the format option were added, there is no data to put in the output. ## Steps to Reproduce ```bash SESSION=$(agents session create --format json | python3 -c "import sys,json; print(json.load(sys.stdin)['data']['session_id'])") agents session tell --session "$SESSION" "Plan a feature" # No Plan Request / Commands Executed / Result / Usage panels appear agents session tell --session "$SESSION" --format json "Plan a feature" # Error: no such option --format ``` ## Expected Result 1. `--format json` option is accepted. 2. Rich output renders four spec-required panels: Plan Request, Commands Executed, Result, Usage. 3. JSON output produces the spec envelope with `plan_request`, `commands_executed`, `result`, `usage` keys. ## Actual Result 1. `--format` option does not exist; attempting to use it raises a CLI error. 2. Rich output renders `user: <prompt>` and `assistant: Acknowledged: <prompt>` — no panels at all. 3. No JSON output path exists. ## Additional Notes - The stub actor execution (lines 831–841) is a known M3 limitation commented in-code. The output structure gap (panels + format option) should be fixed independently of the actor stub. - For the streaming path (lines 843–848), the spec (lines 2393–2423) shows a "Session" panel (ID, Actor, Mode), then streamed text, then a "Usage" panel. - The `--format` option should follow the same pattern as `session list` / `session show`: `fmt: str = "rich"`. --- **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#6307
No description provided.