Skip to content

fix(tui): make /copy work inside tmux without passthrough#20207

Merged
fcoury-oai merged 3 commits intomainfrom
fcoury/copy-in-tmux
May 5, 2026
Merged

fix(tui): make /copy work inside tmux without passthrough#20207
fcoury-oai merged 3 commits intomainfrom
fcoury/copy-in-tmux

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

Summary

  • prefer tmux's native clipboard integration for /copy when running inside tmux
  • fall back to OSC 52 when tmux clipboard copy is unavailable
  • add coverage for tmux-preferred, fallback, and combined-failure paths

Why

Inside tmux, /copy previously relied on DCS-wrapped OSC 52 when TMUX was set. That only reaches the outer terminal when tmux passthrough is enabled, so Codex could report success even though the system clipboard never changed.

User impact

/copy now works inside tmux even when allow-passthrough is off, as long as tmux clipboard integration is available. If tmux cannot handle the copy, Codex still keeps the existing OSC 52 fallback path.

Validation

  • cargo test -p codex-tui
  • just fmt
  • just fix -p codex-tui
  • just argument-comment-lint
  • manually verified /copy inside tmux with allow-passthrough off

Fixes #19926

@fcoury-oai fcoury-oai changed the title [codex] make /copy work inside tmux without passthrough fix(tui): make /copy work inside tmux without passthrough Apr 29, 2026
@fcoury-oai fcoury-oai marked this pull request as ready for review April 29, 2026 13:27
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9beb7718d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/clipboard_copy.rs
Bojun-Vvibe added a commit to Bojun-Vvibe/oss-contributions that referenced this pull request Apr 29, 2026
- anomalyco/opencode#24979 (needs-discussion): unmotivated bus->vehicle rename
- anomalyco/opencode#24971 (merge-after-nits): BRHP ecosystem-docs entry
- openai/codex#20207 (merge-after-nits): tmux native clipboard for /copy
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@fcoury-oai fcoury-oai enabled auto-merge (squash) May 5, 2026 15:57
@fcoury-oai fcoury-oai merged commit 69283aa into main May 5, 2026
26 checks passed
@fcoury-oai fcoury-oai deleted the fcoury/copy-in-tmux branch May 5, 2026 16:18
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/copy does not work inside tmux

2 participants