Skip to content

terminal: Forward Ctrl+V when clipboard contains images#42258

Merged
agu-z merged 1 commit intozed-industries:mainfrom
kingsword09:terminal-paste-image
Dec 17, 2025
Merged

terminal: Forward Ctrl+V when clipboard contains images#42258
agu-z merged 1 commit intozed-industries:mainfrom
kingsword09:terminal-paste-image

Conversation

@kingsword09
Copy link
Contributor

@kingsword09 kingsword09 commented Nov 8, 2025

When running Codex CLI, Claude Code, or other TUI agents in Zed’s terminal, pasting images wasn’t supported — Zed
treated all clipboard content as plain text and simply pushed it into the PTY, so the agent never saw the image data.
This change makes terminal pastes behave like they do in a native terminal: if the clipboard contains an image, Zed now emits a raw Ctrl+V to the PTY so the agent can read the system clipboard itself.

Release Notes:

  • Fixed terminal-launched Codex/Claude sessions by forwarding Ctrl+V for clipboard images so agents can attach them

@cla-bot
Copy link

cla-bot bot commented Nov 8, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @kingsword09 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@kingsword09
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 8, 2025
@cla-bot
Copy link

cla-bot bot commented Nov 8, 2025

The cla-bot has been summoned, and re-checked this pull request!

@agu-z
Copy link
Contributor

agu-z commented Dec 17, 2025

@kingsword09 Looks great, thank you!

@agu-z agu-z merged commit 0c9992c into zed-industries:main Dec 17, 2025
27 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in Quality Week – December 2025 Dec 17, 2025
@kingsword09 kingsword09 deleted the terminal-paste-image branch December 18, 2025 05:13
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
When running Codex CLI, Claude Code, or other TUI agents in Zed’s
terminal, pasting images wasn’t supported — Zed
treated all clipboard content as plain text and simply pushed it into
the PTY, so the agent never saw the image data.
This change makes terminal pastes behave like they do in a native
terminal: if the clipboard contains an image, Zed now emits a raw Ctrl+V
to the PTY so the agent can read the system clipboard itself.

Release Notes:

- Fixed terminal-launched Codex/Claude sessions by forwarding Ctrl+V for
clipboard images so agents can attach them
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…es#42258)

When running Codex CLI, Claude Code, or other TUI agents in Zed’s
terminal, pasting images wasn’t supported — Zed
treated all clipboard content as plain text and simply pushed it into
the PTY, so the agent never saw the image data.
This change makes terminal pastes behave like they do in a native
terminal: if the clipboard contains an image, Zed now emits a raw Ctrl+V
to the PTY so the agent can read the system clipboard itself.

Release Notes:

- Fixed terminal-launched Codex/Claude sessions by forwarding Ctrl+V for
clipboard images so agents can attach them
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…es#42258)

When running Codex CLI, Claude Code, or other TUI agents in Zed’s
terminal, pasting images wasn’t supported — Zed
treated all clipboard content as plain text and simply pushed it into
the PTY, so the agent never saw the image data.
This change makes terminal pastes behave like they do in a native
terminal: if the clipboard contains an image, Zed now emits a raw Ctrl+V
to the PTY so the agent can read the system clipboard itself.

Release Notes:

- Fixed terminal-launched Codex/Claude sessions by forwarding Ctrl+V for
clipboard images so agents can attach them
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
…es#42258)

When running Codex CLI, Claude Code, or other TUI agents in Zed’s
terminal, pasting images wasn’t supported — Zed
treated all clipboard content as plain text and simply pushed it into
the PTY, so the agent never saw the image data.
This change makes terminal pastes behave like they do in a native
terminal: if the clipboard contains an image, Zed now emits a raw Ctrl+V
to the PTY so the agent can read the system clipboard itself.

Release Notes:

- Fixed terminal-launched Codex/Claude sessions by forwarding Ctrl+V for
clipboard images so agents can attach them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

Development

Successfully merging this pull request may close these issues.

3 participants