UAT: TuiCommandRouter._session_command() only handles 3 of 9 session subcommands — create, list, switch, close, delete, rename all return "Unknown session command" #5522

Open
opened 2026-04-09 07:12:06 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: TUI Session Persistence — Session Command Router
Severity: Critical (blocks v3.7.0 milestone acceptance — session management is a core TUI feature)
Spec Reference: §TUI — Session Persistence, §TUI — Sessions Screen


What Was Tested

Code analysis of src/cleveragents/tui/commands.py — the TuiCommandRouter._session_command() method — compared against the slash command catalog in src/cleveragents/tui/slash_catalog.py and the spec's session command requirements.

Expected Behavior (from spec)

The TUI slash command catalog (SLASH_COMMAND_SPECS) advertises 9 session commands:

Command Description
/session:create Create a new session tab
/session:list Display all sessions
/session:show Show session details
/session:switch Switch to a session
/session:close Close the current session
/session:delete Delete a saved session
/session:rename Rename current session
/session:export Export session to JSON
/session:import Import session from JSON

All 9 commands are listed in the overlay and discoverable by users. All 9 must be functional.

Actual Behavior (from code)

TuiCommandRouter._session_command() (lines 106–113 of commands.py) only handles 3 subcommands:

def _session_command(self, tokens: list[str], *, session_id: str) -> str:
    if not tokens or tokens[0] == "show":
        return f"Current session: {session_id}"
    if tokens[0] == "export":
        return self._session_export(tokens[1:], session_id=session_id)
    if tokens[0] == "import":
        return self._session_import(tokens[1:])
    return f"Unknown session command: {' '.join(tokens)}"  # ← all others fall here

The following 6 commands are completely unimplemented and return "Unknown session command: <subcommand>" when invoked:

  • /session:create"Unknown session command: create"
  • /session:list"Unknown session command: list"
  • /session:switch"Unknown session command: switch"
  • /session:close"Unknown session command: close"
  • /session:delete"Unknown session command: delete"
  • /session:rename"Unknown session command: rename"

Steps to Reproduce

  1. Launch the TUI: agents tui
  2. Type /session:create and press Enter
  3. Observe: "Unknown session command: create" is displayed
  4. Repeat for /session:list, /session:switch, /session:close, /session:delete, /session:rename

Code Location

  • File: src/cleveragents/tui/commands.py
  • Method: TuiCommandRouter._session_command() (lines 106–113)
  • Catalog: src/cleveragents/tui/slash_catalog.py (lines 18–26)

Impact

Users see 9 session commands in the slash command overlay but 6 of them silently fail with an error message. This is a broken UX for a core v3.7.0 feature. The session management workflow (create → list → switch → close/delete/rename) is completely non-functional via the TUI command interface.

Note: The broader session persistence infrastructure (SQLite DB, multi-session tabs, SessionsScreen) is tracked in issues #5331, #5334, and #5338. This issue specifically tracks the command router gap.


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

## Bug Report **Feature Area**: TUI Session Persistence — Session Command Router **Severity**: Critical (blocks v3.7.0 milestone acceptance — session management is a core TUI feature) **Spec Reference**: §TUI — Session Persistence, §TUI — Sessions Screen --- ## What Was Tested Code analysis of `src/cleveragents/tui/commands.py` — the `TuiCommandRouter._session_command()` method — compared against the slash command catalog in `src/cleveragents/tui/slash_catalog.py` and the spec's session command requirements. ## Expected Behavior (from spec) The TUI slash command catalog (`SLASH_COMMAND_SPECS`) advertises **9 session commands**: | Command | Description | |---------|-------------| | `/session:create` | Create a new session tab | | `/session:list` | Display all sessions | | `/session:show` | Show session details | | `/session:switch` | Switch to a session | | `/session:close` | Close the current session | | `/session:delete` | Delete a saved session | | `/session:rename` | Rename current session | | `/session:export` | Export session to JSON | | `/session:import` | Import session from JSON | All 9 commands are listed in the overlay and discoverable by users. All 9 must be functional. ## Actual Behavior (from code) `TuiCommandRouter._session_command()` (lines 106–113 of `commands.py`) only handles **3 subcommands**: ```python def _session_command(self, tokens: list[str], *, session_id: str) -> str: if not tokens or tokens[0] == "show": return f"Current session: {session_id}" if tokens[0] == "export": return self._session_export(tokens[1:], session_id=session_id) if tokens[0] == "import": return self._session_import(tokens[1:]) return f"Unknown session command: {' '.join(tokens)}" # ← all others fall here ``` The following 6 commands are **completely unimplemented** and return `"Unknown session command: <subcommand>"` when invoked: - `/session:create` → `"Unknown session command: create"` - `/session:list` → `"Unknown session command: list"` - `/session:switch` → `"Unknown session command: switch"` - `/session:close` → `"Unknown session command: close"` - `/session:delete` → `"Unknown session command: delete"` - `/session:rename` → `"Unknown session command: rename"` ## Steps to Reproduce 1. Launch the TUI: `agents tui` 2. Type `/session:create` and press Enter 3. Observe: `"Unknown session command: create"` is displayed 4. Repeat for `/session:list`, `/session:switch`, `/session:close`, `/session:delete`, `/session:rename` ## Code Location - **File**: `src/cleveragents/tui/commands.py` - **Method**: `TuiCommandRouter._session_command()` (lines 106–113) - **Catalog**: `src/cleveragents/tui/slash_catalog.py` (lines 18–26) ## Impact Users see 9 session commands in the slash command overlay but 6 of them silently fail with an error message. This is a broken UX for a core v3.7.0 feature. The session management workflow (create → list → switch → close/delete/rename) is completely non-functional via the TUI command interface. Note: The broader session persistence infrastructure (SQLite DB, multi-session tabs, SessionsScreen) is tracked in issues #5331, #5334, and #5338. This issue specifically tracks the command router gap. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-09 07:17:59 +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.

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