UAT: agents session create Settings panel shows hardcoded values — streaming, context, memory, max_history not backed by Session domain model #3505

Open
opened 2026-04-05 18:42:45 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/backlog-session-create-settings-domain-model
  • Commit Message: fix(domain): add streaming, context, memory, max_history fields to Session model and wire to CLI settings panel
  • Milestone: None (Backlog)
  • Parent Epic: #397

Backlog note: This issue was discovered during autonomous operation
on milestone v3.5.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Background and Context

Code-level analysis of src/cleveragents/cli/commands/session.py and src/cleveragents/domain/models/core/session.py against docs/specification.md §"agents session create" (lines 1461–1592).

The agents session create command displays a "Settings" panel with hardcoded values for streaming, context, memory, and max_history. These fields are not present in the Session domain model — only automation is stored. The spec requires these settings to be actual session properties that are persisted and retrievable.

Current Behavior (Actual)

In session.py lines 222–229, the Settings panel is hardcoded:

settings_text = (
    "[yellow]Automation:[/yellow] default\n"
    "[yellow]Streaming:[/yellow] off\n"
    "[yellow]Context:[/yellow] default\n"
    "[yellow]Memory:[/yellow] enabled\n"
    "[yellow]Max History:[/yellow] 50 turns"
)
console.print(Panel(settings_text, title="Settings", expand=False))

The Session domain model (session.py) only has automation as a session-level setting. The fields streaming, context, memory, and max_history are not stored in the domain model or database.

Additionally, the JSON/YAML output (once fixed per issue #3499) would need to read these values from the actual session settings rather than hardcoded defaults.

Expected Behavior (from spec §"agents session create", lines 1486–1492 and 1545–1550)

The Settings panel should show actual session settings:

╭─ Settings ─────────────╮
│ Automation: review     │
│ Streaming: off         │
│ Context: default       │
│ Memory: enabled        │
│ Max History: 50 turns  │
╰────────────────────────╯

These values should be:

  1. Stored in the Session domain model
  2. Persisted to the database
  3. Configurable via --actor binding or global config
  4. Reflected in the JSON/YAML output under data.settings

Code Location

  • src/cleveragents/cli/commands/session.py, create() function, lines 222–229 (hardcoded settings panel)
  • src/cleveragents/domain/models/core/session.py, Session class — missing streaming, context, memory, max_history fields

Steps to Reproduce

  1. Run: agents session create
  2. Observe: Settings panel shows hardcoded "off", "default", "enabled", "50 turns" regardless of any configuration
  3. Run: agents session create --format json
  4. Observe: No settings object in output (related to issue #3499)

Subtasks

  • Add streaming, context, memory, max_history fields to the Session domain model
  • Add database migration for new session fields
  • Update SessionRepository to persist and retrieve new fields
  • Update create() CLI command to read settings from session object instead of hardcoding
  • Update JSON/YAML output to include actual data.settings values
  • Add Behave scenarios for settings persistence and display
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97%

Definition of Done

  • Session domain model has streaming, context, memory, max_history fields
  • Settings are persisted to database and retrievable
  • agents session create Settings panel shows actual session settings
  • JSON/YAML output includes data.settings with actual values
  • All Behave scenarios pass
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/backlog-session-create-settings-domain-model` - **Commit Message**: `fix(domain): add streaming, context, memory, max_history fields to Session model and wire to CLI settings panel` - **Milestone**: None (Backlog) - **Parent Epic**: #397 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.5.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background and Context Code-level analysis of `src/cleveragents/cli/commands/session.py` and `src/cleveragents/domain/models/core/session.py` against `docs/specification.md` §"agents session create" (lines 1461–1592). The `agents session create` command displays a "Settings" panel with hardcoded values for `streaming`, `context`, `memory`, and `max_history`. These fields are not present in the `Session` domain model — only `automation` is stored. The spec requires these settings to be actual session properties that are persisted and retrievable. ## Current Behavior (Actual) In `session.py` lines 222–229, the Settings panel is hardcoded: ```python settings_text = ( "[yellow]Automation:[/yellow] default\n" "[yellow]Streaming:[/yellow] off\n" "[yellow]Context:[/yellow] default\n" "[yellow]Memory:[/yellow] enabled\n" "[yellow]Max History:[/yellow] 50 turns" ) console.print(Panel(settings_text, title="Settings", expand=False)) ``` The `Session` domain model (`session.py`) only has `automation` as a session-level setting. The fields `streaming`, `context`, `memory`, and `max_history` are not stored in the domain model or database. Additionally, the JSON/YAML output (once fixed per issue #3499) would need to read these values from the actual session settings rather than hardcoded defaults. ## Expected Behavior (from spec §"agents session create", lines 1486–1492 and 1545–1550) The Settings panel should show actual session settings: ``` ╭─ Settings ─────────────╮ │ Automation: review │ │ Streaming: off │ │ Context: default │ │ Memory: enabled │ │ Max History: 50 turns │ ╰────────────────────────╯ ``` These values should be: 1. Stored in the `Session` domain model 2. Persisted to the database 3. Configurable via `--actor` binding or global config 4. Reflected in the JSON/YAML output under `data.settings` ## Code Location - `src/cleveragents/cli/commands/session.py`, `create()` function, lines 222–229 (hardcoded settings panel) - `src/cleveragents/domain/models/core/session.py`, `Session` class — missing `streaming`, `context`, `memory`, `max_history` fields ## Steps to Reproduce 1. Run: `agents session create` 2. Observe: Settings panel shows hardcoded "off", "default", "enabled", "50 turns" regardless of any configuration 3. Run: `agents session create --format json` 4. Observe: No `settings` object in output (related to issue #3499) ## Subtasks - [ ] Add `streaming`, `context`, `memory`, `max_history` fields to the `Session` domain model - [ ] Add database migration for new session fields - [ ] Update `SessionRepository` to persist and retrieve new fields - [ ] Update `create()` CLI command to read settings from session object instead of hardcoding - [ ] Update JSON/YAML output to include actual `data.settings` values - [ ] Add Behave scenarios for settings persistence and display - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% ## Definition of Done - [ ] `Session` domain model has `streaming`, `context`, `memory`, `max_history` fields - [ ] Settings are persisted to database and retrievable - [ ] `agents session create` Settings panel shows actual session settings - [ ] JSON/YAML output includes `data.settings` with actual values - [ ] All Behave scenarios pass - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.7.0 milestone 2026-04-05 20:36:09 +00:00
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.

Blocks
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3505
No description provided.