UAT: agents session create --format json omits spec-required sections #6269

Open
opened 2026-04-09 19:43:02 +00:00 by HAL9000 · 0 comments
Owner

Summary

agents session create --format json does not emit the spec-required structure. The JSON envelope is missing the command string, and the data payload only contains a flat summary instead of the documented session, settings, and actor_details sections. The default messages entry is also just "ok" rather than "Session created".

Steps to Reproduce

  1. Ensure the CLI is configured (e.g., run agents init).
  2. Run agents session create --format json --actor local/orchestrator.

Expected Result

Based on docs/specification.md (§agents session create, lines 1462-1593), the JSON output should follow the documented envelope:

  • command == the exact CLI invocation.
  • messages[0].text == "Session created".
  • data contains nested session, settings, and actor_details objects matching the spec example.

Actual Result

The emitted JSON looks like:

{
  "command": "",
  "status": "ok",
  "exit_code": 0,
  "data": {
    "session_id": "01H...",
    "actor": "local/orchestrator",
    "namespace": "local",
    "messages": 0,
    "created": "2026-04-09T12:34:56.789Z",
    "updated": "2026-04-09T12:34:56.789Z"
  },
  "timing": {"duration_ms": 12},
  "messages": [{"level": "ok", "text": "ok"}]
}

(Structure inferred from src/cleveragents/cli/commands/session.py lines 172-244 and format_output implementation.)

Key differences:

  • command is blank and messages[0].text is just "ok" because the CLI never passes the executed command string to format_output.
  • The data payload is only the _session_summary_dict output and lacks the documented session, settings, and actor_details sections.

Additional Notes

Other machine-readable session commands call format_output the same way, so agents session list/show ... --format json|yaml also miss their spec-required sections and messages.


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

## Summary `agents session create --format json` does not emit the spec-required structure. The JSON envelope is missing the `command` string, and the `data` payload only contains a flat summary instead of the documented `session`, `settings`, and `actor_details` sections. The default `messages` entry is also just `"ok"` rather than `"Session created"`. ## Steps to Reproduce 1. Ensure the CLI is configured (e.g., run `agents init`). 2. Run `agents session create --format json --actor local/orchestrator`. ## Expected Result Based on docs/specification.md (§agents session create, lines 1462-1593), the JSON output should follow the documented envelope: - `command` == the exact CLI invocation. - `messages[0].text` == "Session created". - `data` contains nested `session`, `settings`, and `actor_details` objects matching the spec example. ## Actual Result The emitted JSON looks like: ```json { "command": "", "status": "ok", "exit_code": 0, "data": { "session_id": "01H...", "actor": "local/orchestrator", "namespace": "local", "messages": 0, "created": "2026-04-09T12:34:56.789Z", "updated": "2026-04-09T12:34:56.789Z" }, "timing": {"duration_ms": 12}, "messages": [{"level": "ok", "text": "ok"}] } ``` (Structure inferred from `src/cleveragents/cli/commands/session.py` lines 172-244 and `format_output` implementation.) Key differences: - `command` is blank and `messages[0].text` is just "ok" because the CLI never passes the executed command string to `format_output`. - The `data` payload is only the `_session_summary_dict` output and lacks the documented `session`, `settings`, and `actor_details` sections. ## Additional Notes Other machine-readable session commands call `format_output` the same way, so `agents session list/show ... --format json|yaml` also miss their spec-required sections and messages. --- **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#6269
No description provided.