-
Notifications
You must be signed in to change notification settings - Fork 187
Description
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 --tuiRelated issues in other Ratatui-based TUIs
- anthropics/claude-code#16753 — identical symptom in Claude Code 2.1.0
- openai/codex#1247 — same architectural limitation in Codex CLI's Rust TUI
- crossterm-rs/crossterm#545 — bracketed paste support in crossterm
Steps to Reproduce
- Copy any multi-character string to the clipboard (e.g.
hello world) - Launch
kiro-cli chat --tui - 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