Skip to content

[Bug]: TUI: Input typed during model generation is swallowed and incorrectly queued for the next turn (Interrupt failure) #45326

@Jinshi-Liu

Description

@Jinshi-Liu

Bug type

Behavior bug (incorrect output/state without crash)

Summary

When using openclaw tui, attempting to interrupt the AI while it is actively generating a response (or thinking) fails. Any text typed during the generation process is visually "swallowed" and ignored. However, this swallowed input is improperly buffered. When the user initiates the next conversation turn, the previously swallowed text is automatically sent as the new prompt, causing a complete context mismatch.

Steps to reproduce

1.Start the TUI client using openclaw tui.

2.Send a prompt that requires a long output (e.g., "Write a very long and detailed Python script for data analysis").

3.While the AI is streaming the response, type an interruption command in the terminal (e.g., type "Wait, stop, use C++ instead" and press Enter).

4.Actual behavior 1: The AI does not stop generating. The typed text "Wait, stop..." is swallowed and nothing happens.

5.Wait for the AI to finish its long output.

6.Type a completely new prompt (e.g., "Explain what a compiler backend is") and press Enter.

7.Actual behavior 2: Instead of processing the new prompt about compilers, the TUI forcefully sends the previously swallowed text ("Wait, stop, use C++ instead") to the AI.

Expected behavior

Typing during generation should either immediately interrupt the stream, or the TUI should reject/clear the input buffer while the AI is busy, preventing old keystrokes from bleeding into the next conversation turn.

Actual behavior

Actual behavior 1: The AI does not stop generating. The typed text "Wait, stop..." is swallowed and nothing happens.
Actual behavior 2: Instead of processing the new prompt about compilers, the TUI forcefully sends the previously swallowed text ("Wait, stop, use C++ instead") to the AI.

OpenClaw version

OpenClaw Version: 2026.3.12 (6472949)

Operating system

Windows WSL2 (Ubuntu)

Install method

npm global

Model

custom-api-deepseek-com/deepseek-reasoner

Provider / routing chain

openclaw -> custom provider -> deepseek

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingbug:behaviorIncorrect behavior without a crashclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions