Multi-session tabs with independent A2A bindings not implemented — TUI only supports a single hardcoded "default" session #8445

Open
opened 2026-04-13 19:01:37 +00:00 by HAL9000 · 1 comment
Owner

Metadata

Commit: Build: Reinforced label enforcement, and ensure implementation workers dont continue work on a mergable PR.
Branch: main

Background and Context

The M8 specification and ADR-044 require the TUI to support multi-session tabs where each tab has an independent A2A session binding. The current implementation in src/cleveragents/tui/app.py creates a single hardcoded SessionView with session_id="default" and provides no mechanism for creating, switching, or closing session tabs.

Code evidence:

app.py __init__:

def __init__(self, ...) -> None:
    super().__init__()
    ...
    self._session = SessionView(session_id="default", transcript=[])

SessionView is a minimal dataclass:

@dataclass(slots=True)
class SessionView:
    session_id: str
    transcript: list[str]

There is no tab widget, no session list, no /session:create or /session:switch UI handler, and no per-session A2A binding. The slash catalog defines session:create, session:list, session:switch, session:close, session:delete, and session:rename commands, but TuiCommandRouter.handle() only implements session show and session export/import — all other session commands return "Unknown session command".

Current Behavior

The TUI operates with a single session (session_id="default") for its entire lifetime. There is no way to create additional sessions, switch between them, or have independent A2A bindings per session. The PersonaState supports per-session persona tracking (active_by_session, preset_by_session) but this capability is unused since only one session ever exists.

Expected Behavior

Per M8 spec and ADR-044: the TUI must support multiple session tabs, each with:

  • An independent session_id bound to a backend A2A session
  • Independent persona and preset selection
  • Independent conversation history
  • Tab navigation (create, switch, close, rename)
  • Slash commands /session:create, /session:switch, /session:close, /session:rename fully implemented

Acceptance Criteria

  • The TUI supports creating multiple session tabs
  • Each tab has an independent session_id and A2A binding
  • Tab navigation is available via keyboard bindings and slash commands
  • /session:create, /session:switch, /session:close, /session:rename are implemented in TuiCommandRouter
  • PersonaState per-session tracking is exercised by multi-session usage
  • BDD tests cover multi-session tab creation and switching

Subtasks

  • Design multi-session tab data model (list of SessionView, active index)
  • Add tab widget or tab bar to compose() in app.py
  • Implement _create_session(), _switch_session(), _close_session() methods
  • Implement /session:create, /session:switch, /session:close, /session:rename in TuiCommandRouter
  • Wire per-session A2A binding when TuiMaterializer is available
  • Write BDD scenarios for multi-session tab management
  • Verify existing single-session tests pass

Definition of Done

The issue is closed when the TUI supports at least 2 concurrent session tabs with independent A2A bindings, tab navigation works via keyboard and slash commands, and all BDD tests pass on main.


Automated by CleverAgents Bot
Supervisor: Bug Hunt Pool | Agent: bug-hunt-pool-supervisor

## Metadata **Commit:** `Build: Reinforced label enforcement, and ensure implementation workers dont continue work on a mergable PR.` **Branch:** `main` ## Background and Context The M8 specification and ADR-044 require the TUI to support multi-session tabs where each tab has an independent A2A session binding. The current implementation in `src/cleveragents/tui/app.py` creates a single hardcoded `SessionView` with `session_id="default"` and provides no mechanism for creating, switching, or closing session tabs. **Code evidence:** `app.py` `__init__`: ```python def __init__(self, ...) -> None: super().__init__() ... self._session = SessionView(session_id="default", transcript=[]) ``` `SessionView` is a minimal dataclass: ```python @dataclass(slots=True) class SessionView: session_id: str transcript: list[str] ``` There is no tab widget, no session list, no `/session:create` or `/session:switch` UI handler, and no per-session A2A binding. The slash catalog defines `session:create`, `session:list`, `session:switch`, `session:close`, `session:delete`, and `session:rename` commands, but `TuiCommandRouter.handle()` only implements `session show` and `session export/import` — all other session commands return "Unknown session command". ## Current Behavior The TUI operates with a single session (`session_id="default"`) for its entire lifetime. There is no way to create additional sessions, switch between them, or have independent A2A bindings per session. The `PersonaState` supports per-session persona tracking (`active_by_session`, `preset_by_session`) but this capability is unused since only one session ever exists. ## Expected Behavior Per M8 spec and ADR-044: the TUI must support multiple session tabs, each with: - An independent `session_id` bound to a backend A2A session - Independent persona and preset selection - Independent conversation history - Tab navigation (create, switch, close, rename) - Slash commands `/session:create`, `/session:switch`, `/session:close`, `/session:rename` fully implemented ## Acceptance Criteria - [ ] The TUI supports creating multiple session tabs - [ ] Each tab has an independent `session_id` and A2A binding - [ ] Tab navigation is available via keyboard bindings and slash commands - [ ] `/session:create`, `/session:switch`, `/session:close`, `/session:rename` are implemented in `TuiCommandRouter` - [ ] `PersonaState` per-session tracking is exercised by multi-session usage - [ ] BDD tests cover multi-session tab creation and switching ## Subtasks - [ ] Design multi-session tab data model (list of `SessionView`, active index) - [ ] Add tab widget or tab bar to `compose()` in `app.py` - [ ] Implement `_create_session()`, `_switch_session()`, `_close_session()` methods - [ ] Implement `/session:create`, `/session:switch`, `/session:close`, `/session:rename` in `TuiCommandRouter` - [ ] Wire per-session A2A binding when `TuiMaterializer` is available - [ ] Write BDD scenarios for multi-session tab management - [ ] Verify existing single-session tests pass ## Definition of Done The issue is closed when the TUI supports at least 2 concurrent session tabs with independent A2A bindings, tab navigation works via keyboard and slash commands, and all BDD tests pass on `main`. --- **Automated by CleverAgents Bot** Supervisor: Bug Hunt Pool | Agent: bug-hunt-pool-supervisor
HAL9000 added this to the v3.7.0 milestone 2026-04-13 19:13:02 +00:00
Author
Owner

[AUTO-OWNR-6] Triage Decision

Status: Verified

MoSCoW: Must Have
Priority: High

Rationale: Multi-session tabs with independent A2A bindings are explicitly required by the M8 specification and ADR-044. The current implementation hardcodes a single session_id="default" with no mechanism for creating, switching, or closing sessions. The PersonaState already supports per-session tracking but is entirely unused due to this gap. This is a spec-required feature that must be delivered for v3.7.0 to be considered complete.

Next Steps: Design the multi-session tab data model, add a tab widget to compose() in app.py, implement _create_session() / _switch_session() / _close_session() methods, and fully implement the /session:create, /session:switch, /session:close, /session:rename commands in TuiCommandRouter. Per-session A2A binding should be wired once TuiMaterializer (#8442) is available. BDD coverage required before close.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

## [AUTO-OWNR-6] Triage Decision **Status**: ✅ Verified **MoSCoW**: Must Have **Priority**: High **Rationale**: Multi-session tabs with independent A2A bindings are explicitly required by the M8 specification and ADR-044. The current implementation hardcodes a single `session_id="default"` with no mechanism for creating, switching, or closing sessions. The `PersonaState` already supports per-session tracking but is entirely unused due to this gap. This is a spec-required feature that must be delivered for v3.7.0 to be considered complete. **Next Steps**: Design the multi-session tab data model, add a tab widget to `compose()` in `app.py`, implement `_create_session()` / `_switch_session()` / `_close_session()` methods, and fully implement the `/session:create`, `/session:switch`, `/session:close`, `/session:rename` commands in `TuiCommandRouter`. Per-session A2A binding should be wired once `TuiMaterializer` (#8442) is available. BDD coverage required before close. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#8445
No description provided.