UAT: TUI ctrl+c double-tap quit not implemented — only ctrl+q binding exists, no interrupt/quit behavior #5079

Open
opened 2026-04-09 00:56:02 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Sandbox and Checkpoint / TUI Safety Behaviors
Tested By: UAT worker (uat-pool-1), feature area: Sandbox and Checkpoint
Severity: Medium (safety behavior missing — users cannot interrupt running actors via ctrl+c)


What Was Tested

The TUI ctrl+c double-tap quit behavior was checked against the specification's Safety Behaviors section (§Safety Behaviors — Double-Tap Quit, lines 30326–30332).

Expected Behavior (from spec)

The spec defines the following ctrl+c behavior:

  1. First press: If an actor is processing, sends an interrupt/cancel signal to the actor. If idle, shows a flash message: Press ctrl+c again within 5s to quit
  2. Second press within 5s: Quits the TUI (after saving session state)
  3. Second press after 5s: Resets — treated as a new first press

Additionally: ctrl+q always quits immediately (after saving session state) without requiring a double-tap.

Actual Behavior (from code)

The TUI app (src/cleveragents/tui/app.py) only defines a single binding:

BINDINGS: ClassVar[list[tuple[str, str, str]]] = [
    ("ctrl+q", "quit", "Quit"),   # ✓ ctrl+q is present
    ("f1", "help", "Help"),
    ("ctrl+t", "cycle_preset", "Cycle Preset"),
    # ❌ No ctrl+c binding
    # ❌ No double-tap logic
    # ❌ No 5-second timer
    # ❌ No interrupt signal to actor
    # ❌ No flash message
]

There is no ctrl+c handler anywhere in the TUI app. The entire double-tap quit mechanism is absent.

Code Location

src/cleveragents/tui/app.py, lines 92–96 (BINDINGS class variable)

Steps to Reproduce

  1. Start the TUI: agents tui
  2. Press ctrl+c once
  3. Expected: Flash message "Press ctrl+c again within 5s to quit" (or interrupt signal if actor is running)
  4. Actual: No response (Textual may pass ctrl+c to the terminal, causing immediate exit without session state save)

Impact

  • Safety: Users cannot interrupt a running actor mid-execution via ctrl+c — the spec requires this as a safety mechanism to cancel runaway executions
  • Data loss: If ctrl+c causes immediate exit (terminal default), session state is not saved
  • UX: The spec-required flash message and 5-second window are absent, making the quit behavior unpredictable

§Safety Behaviors — Double-Tap Quit (lines 30326–30332):

ctrl+c does not immediately quit the TUI. Instead:

  1. First press: If an actor is processing, sends an interrupt/cancel signal to the actor. If idle, shows a flash message: Press ctrl+c again within 5s to quit
  2. Second press within 5s: Quits the TUI (after saving session state)
  3. Second press after 5s: Resets — treated as a new first press

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

## Bug Report **Feature Area**: Sandbox and Checkpoint / TUI Safety Behaviors **Tested By**: UAT worker (uat-pool-1), feature area: Sandbox and Checkpoint **Severity**: Medium (safety behavior missing — users cannot interrupt running actors via ctrl+c) --- ## What Was Tested The TUI `ctrl+c` double-tap quit behavior was checked against the specification's Safety Behaviors section (§Safety Behaviors — Double-Tap Quit, lines 30326–30332). ## Expected Behavior (from spec) The spec defines the following `ctrl+c` behavior: 1. **First press**: If an actor is processing, sends an interrupt/cancel signal to the actor. If idle, shows a flash message: `Press ctrl+c again within 5s to quit` 2. **Second press within 5s**: Quits the TUI (after saving session state) 3. **Second press after 5s**: Resets — treated as a new first press Additionally: `ctrl+q` always quits immediately (after saving session state) without requiring a double-tap. ## Actual Behavior (from code) The TUI app (`src/cleveragents/tui/app.py`) only defines a single binding: ```python BINDINGS: ClassVar[list[tuple[str, str, str]]] = [ ("ctrl+q", "quit", "Quit"), # ✓ ctrl+q is present ("f1", "help", "Help"), ("ctrl+t", "cycle_preset", "Cycle Preset"), # ❌ No ctrl+c binding # ❌ No double-tap logic # ❌ No 5-second timer # ❌ No interrupt signal to actor # ❌ No flash message ] ``` There is no `ctrl+c` handler anywhere in the TUI app. The entire double-tap quit mechanism is absent. ## Code Location `src/cleveragents/tui/app.py`, lines 92–96 (`BINDINGS` class variable) ## Steps to Reproduce 1. Start the TUI: `agents tui` 2. Press `ctrl+c` once 3. Expected: Flash message "Press ctrl+c again within 5s to quit" (or interrupt signal if actor is running) 4. Actual: No response (Textual may pass ctrl+c to the terminal, causing immediate exit without session state save) ## Impact - **Safety**: Users cannot interrupt a running actor mid-execution via `ctrl+c` — the spec requires this as a safety mechanism to cancel runaway executions - **Data loss**: If `ctrl+c` causes immediate exit (terminal default), session state is not saved - **UX**: The spec-required flash message and 5-second window are absent, making the quit behavior unpredictable ## Related Spec Section §Safety Behaviors — Double-Tap Quit (lines 30326–30332): > `ctrl+c` does not immediately quit the TUI. Instead: > 1. First press: If an actor is processing, sends an interrupt/cancel signal to the actor. If idle, shows a flash message: `Press ctrl+c again within 5s to quit` > 2. Second press within 5s: Quits the TUI (after saving session state) > 3. Second press after 5s: Resets — treated as a new first press --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-09 01:02:20 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — TUI spec compliance bug; deviates from documented TUI behavior
  • Milestone: v3.7.0 (TUI milestone)
  • Story Points: 3 — M
  • MoSCoW: Must Have — TUI spec compliance is required for the TUI Legendary
  • Parent Epic: #4963 or #4966 (TUI Epics)

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

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — TUI spec compliance bug; deviates from documented TUI behavior - **Milestone**: v3.7.0 (TUI milestone) - **Story Points**: 3 — M - **MoSCoW**: Must Have — TUI spec compliance is required for the TUI Legendary - **Parent Epic**: #4963 or #4966 (TUI Epics) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5079
No description provided.