UAT: agents session list missing --actor filter option — cannot filter sessions by actor #5891

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

Bug Report

Feature Area: Session Management — agents session list
Severity: Backlog (filtering is a convenience feature)

What Was Tested

Code-level analysis of:

  • src/cleveragents/cli/commands/session.pylist_sessions command
  • src/cleveragents/infrastructure/database/repositories.pySessionRepository.list_all()

Expected Behavior

The SessionRepository.list_all() method already supports actor-based filtering (line 4119):

def list_all(self, actor_name: str | None = None) -> list[Any]:
    """List all sessions, optionally filtered by actor_name."""
    ...
    if actor_name is not None:
        query = query.filter_by(actor_name=actor_name)

Users should be able to filter sessions by actor: agents session list --actor local/orchestrator.

Actual Behavior (from code)

The list_sessions CLI command (session.py lines 263–340) only accepts --format:

@app.command("list")
def list_sessions(
    fmt: Annotated[
        str,
        typer.Option("--format", "-f", help=_FORMAT_HELP),
    ] = "rich",
) -> None:

There is no --actor filter option. The service call (line 270) passes no filter:

sessions = service.list()

The PersistentSessionService.list() method also does not accept any filter parameters.

Code Location

  • src/cleveragents/cli/commands/session.py, lines 263–340 (list_sessions command)
  • src/cleveragents/application/services/session_service.py, list() method — missing actor_name parameter
  • src/cleveragents/domain/models/core/session.py, SessionService.list() ABC — missing actor_name parameter

Impact

Users with many sessions across multiple actors cannot filter the list to show only sessions for a specific actor. The SessionRepository already supports this filtering but it is not exposed through the service or CLI layers.


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

## Bug Report **Feature Area:** Session Management — `agents session list` **Severity:** Backlog (filtering is a convenience feature) ## What Was Tested Code-level analysis of: - `src/cleveragents/cli/commands/session.py` — `list_sessions` command - `src/cleveragents/infrastructure/database/repositories.py` — `SessionRepository.list_all()` ## Expected Behavior The `SessionRepository.list_all()` method already supports actor-based filtering (line 4119): ```python def list_all(self, actor_name: str | None = None) -> list[Any]: """List all sessions, optionally filtered by actor_name.""" ... if actor_name is not None: query = query.filter_by(actor_name=actor_name) ``` Users should be able to filter sessions by actor: `agents session list --actor local/orchestrator`. ## Actual Behavior (from code) The `list_sessions` CLI command (`session.py` lines 263–340) only accepts `--format`: ```python @app.command("list") def list_sessions( fmt: Annotated[ str, typer.Option("--format", "-f", help=_FORMAT_HELP), ] = "rich", ) -> None: ``` There is no `--actor` filter option. The service call (line 270) passes no filter: ```python sessions = service.list() ``` The `PersistentSessionService.list()` method also does not accept any filter parameters. ## Code Location - `src/cleveragents/cli/commands/session.py`, lines 263–340 (`list_sessions` command) - `src/cleveragents/application/services/session_service.py`, `list()` method — missing `actor_name` parameter - `src/cleveragents/domain/models/core/session.py`, `SessionService.list()` ABC — missing `actor_name` parameter ## Impact Users with many sessions across multiple actors cannot filter the list to show only sessions for a specific actor. The `SessionRepository` already supports this filtering but it is not exposed through the service or CLI layers. --- **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.

Reference
cleveragents/cleveragents-core#5891
No description provided.