Pre-submit Checks
Feature request: paste_transform — pipe clipboard through a shell command before insertion
Summary
When pasting output from AI TUI tools (Kiro CLI, Claude Code, GSD, and similar) into Warp, the clipboard contains rendering artifacts that make pasted code syntactically broken. Warp should expose a config hook that pipes clipboard content through an arbitrary shell command before inserting it into the input block.
Problem
Modern AI coding assistants render responses in styled terminal panels. Their /copy to clipboard commands capture the rendered buffer rather than raw message text. Two artifact classes land in Warp on every paste:
1. Box-padding bleed. TUI code blocks indent content by a fixed amount (typically 2 spaces). Every interior line carries that prefix. Heredoc content and config file values arrive with leading whitespace that breaks syntax:
# What lands in Warp after Cmd+V from Kiro CLI:
cat > ~/.config/app/config << 'EOF'
[settings]
timeout = 30
EOF
The [settings] and timeout lines have 2-space indent — the heredoc writes a broken config file silently.
2. Soft-wrap line splits. Lines that exceed the TUI's render width split at the column boundary. A single-line Python expression:
session_valid = python3 -c "import os,time; exit(0 if time.time() < os.path.getmtime(os.path.expanduser('~/.cache/app/token')) + 7200 else 1)"
arrives in Warp as two lines:
session_valid = python3 -c "import os,time; exit(0 if time.time() < os.path.getmtime(os.path.expanduser('~/.cache/app/token')) + 7200
else 1)"
This is a SyntaxError if pasted into a shell.
Proposed solution
Add a paste_transform field to [terminal.input] in ~/.warp/settings.toml:
[terminal.input]
paste_transform = "tui-clean -" # https://github.com/rndjams/tui-clean
Semantics:
- Warp pipes clipboard content through the specified command (stdin → stdout) before inserting into the input block.
- On non-zero exit or empty stdout, fall back to the original clipboard content — never silently drop a paste.
- Unset by default; no behavior change for existing users.
- Command runs in a login shell so
PATH and user environment are available.
This is a power-user escape hatch. The correct long-term fix is for TUI tools to emit clipboard content via OSC 52 (bypassing the render buffer entirely — see root cause note below), but that requires changes across multiple third-party tools. paste_transform gives users relief before those upstream fixes land.
Alternatives considered
ZLE bracketed-paste override. In iTerm2 and traditional terminals, zsh's ZLE widget can intercept and transform paste content before it reaches the shell. Warp's input block bypasses the bracketed-paste protocol entirely, so this approach does not apply here.
Manual fixclip alias before each paste. Running pbpaste | tui-clean - | pbcopy before pasting works but breaks the Cmd+C → Cmd+V flow.
Root cause note
The underlying issue is that Kiro CLI, Claude Code, GSD, and similar tools copy the rendered terminal buffer on /copy to clipboard rather than raw message text. The correct fix for each tool is to emit an OSC 52 escape sequence with plain-text content, bypassing the render pipeline. Separate issues filed with upstream tools:
paste_transform bridges the gap while those land.
Impact
- Affected: any Warp user who pastes generated code from an AI TUI assistant
- Severity: high — pastes are silently syntactically broken, not visually obvious
- Frequency: every paste from Kiro CLI, Claude Code, GSD, or similar
- Workaround cost: manual extra step before every paste, or OS-level system permission grants
Platform
- macOS arm64 (Apple Silicon)
- Warp v0.2026.05.20.09.21.stable_03
- zsh 5.9
Does this block you from using Warp daily?
No, but it breaks every AI-generated heredoc and multi-line expression paste.
Is this issue specific to Warp?
The artifact exists in all terminals. The ZLE workaround handles it transparently in iTerm2, Ghostty, and kitty. The Warp-specific gap is that Warp's input block does not participate in the bracketed-paste protocol, so the ZLE fix has no effect here.
Pre-submit Checks
Feature request:
paste_transform— pipe clipboard through a shell command before insertionSummary
When pasting output from AI TUI tools (Kiro CLI, Claude Code, GSD, and similar) into Warp, the clipboard contains rendering artifacts that make pasted code syntactically broken. Warp should expose a config hook that pipes clipboard content through an arbitrary shell command before inserting it into the input block.
Problem
Modern AI coding assistants render responses in styled terminal panels. Their
/copy to clipboardcommands capture the rendered buffer rather than raw message text. Two artifact classes land in Warp on every paste:1. Box-padding bleed. TUI code blocks indent content by a fixed amount (typically 2 spaces). Every interior line carries that prefix. Heredoc content and config file values arrive with leading whitespace that breaks syntax:
The
[settings]andtimeoutlines have 2-space indent — the heredoc writes a broken config file silently.2. Soft-wrap line splits. Lines that exceed the TUI's render width split at the column boundary. A single-line Python expression:
arrives in Warp as two lines:
This is a
SyntaxErrorif pasted into a shell.Proposed solution
Add a
paste_transformfield to[terminal.input]in~/.warp/settings.toml:Semantics:
PATHand user environment are available.This is a power-user escape hatch. The correct long-term fix is for TUI tools to emit clipboard content via OSC 52 (bypassing the render buffer entirely — see root cause note below), but that requires changes across multiple third-party tools.
paste_transformgives users relief before those upstream fixes land.Alternatives considered
ZLE
bracketed-pasteoverride. In iTerm2 and traditional terminals, zsh's ZLE widget can intercept and transform paste content before it reaches the shell. Warp's input block bypasses the bracketed-paste protocol entirely, so this approach does not apply here.Manual
fixclipalias before each paste. Runningpbpaste | tui-clean - | pbcopybefore pasting works but breaks the Cmd+C → Cmd+V flow.Root cause note
The underlying issue is that Kiro CLI, Claude Code, GSD, and similar tools copy the rendered terminal buffer on
/copy to clipboardrather than raw message text. The correct fix for each tool is to emit an OSC 52 escape sequence with plain-text content, bypassing the render pipeline. Separate issues filed with upstream tools:paste_transformbridges the gap while those land.Impact
Platform
Does this block you from using Warp daily?
No, but it breaks every AI-generated heredoc and multi-line expression paste.
Is this issue specific to Warp?
The artifact exists in all terminals. The ZLE workaround handles it transparently in iTerm2, Ghostty, and kitty. The Warp-specific gap is that Warp's input block does not participate in the bracketed-paste protocol, so the ZLE fix has no effect here.