Skip to content

--tui mode breaks clipboard paste (Cmd+V) — only last character of clipboard content appears #6634

@thobai

Description

@thobai

Before opening, please confirm:

Operating System

macOS 26.3.1

Kiro Version

1.28.1

Bug Description

--tui mode breaks clipboard paste (Cmd+V) — only last character of clipboard content appears

Bug

When using kiro-cli chat --tui, pasting from the system clipboard via Cmd+V (or Edit → Paste) inserts only the last character of the clipboard content instead of the full string. This happens both inside and outside of tmux. The non-TUI mode (kiro-cli chat) handles paste correctly.

Root cause

The TUI appears to process pasted text as individual key events rather than as a single bracketed paste event. The terminal emulator sends the clipboard contents as a rapid stream of characters (wrapped in \e[200~...\e[201~ bracketed paste sequences), but the TUI input handler treats each character as a separate keystroke. The input field gets overwritten on each event, leaving only the final character visible.

This suggests the TUI is not handling crossterm's EnableBracketedPaste / Event::Paste(...) events.

Environment

  • kiro-cli: 1.28.1
  • macOS: 26.3.1
  • Terminal: iTerm2 3.6.9
  • Also reproduced outside tmux (direct iTerm2 shell)

Workaround

Use the non-TUI mode for paste-heavy sessions:

kiro-cli chat --resume  # without --tui

Related issues in other Ratatui-based TUIs

Steps to Reproduce

  1. Copy any multi-character string to the clipboard (e.g. hello world)
  2. Launch kiro-cli chat --tui
  3. Press Cmd+V in the input field

Expected: hello world is pasted into the input field
Actual: Only d (the last character of the clipboard content) appears

Expected Behavior

Pasting should work using Cmd+v and paste the whole string

Conversation ID

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions