[FEATURE] optional feature/config for "copy on select"

Status Closed — not planned
Maintainer reply None cached
Activity 10 comments · opened Feb 26, 2026 · closed Jun 4, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I often need to copy out commands from claude's output to paste into another place. I want to be able to copy them simply by highlighting the text (like in OpenCode) and for newlines from softwrapping to not show up as actual newlines in the copied text.

Proposed Solution

In OpenCode there is a feature where when you highlight text in the TUI from agent output, it automatically copies it, and also copies it without any softwrap showing up as newlines (related to this issue: https://github.com/anthropics/claude-code/issues/22073), so it can easily be pasted into another place.

I love this feature and would appreciate if it were added to Claude Code (possibly as a configurable option that could be turned on or off for those who want it)

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

Interactive mode (TUI)

Use Case Example

I am using Claude Code to generate bash that I will execute in another terminal or server -- I want to copy the text out of Claude Code in a seamless and easy way so I can paste it into another terminal. I want to take one command at a time and not /copy the whole previous output.

Additional Context

_No response_

View original on GitHub ↗

10 Comments

oda251 · 5 months ago

I hit this daily, would love to see it addressed.

a692570 · 5 months ago

Seconding this strongly. The OpenCode comparison is the right frame.

OpenCode renders plain text that terminals can natively select and copy. Claude Code's rich formatting (borders, colors, hard-wrap indentation) means any drag-select captures ANSI escape sequences and mangled line breaks — unusable without cleaning up manually.

Two things that would close this gap:

  1. Copy on select (this issue) — terminal-native, zero extra steps, matches how every other TUI tool works
  2. A chat:copyLastResponse keybinding action — lower-lift implementation path since the keybindings infrastructure already exists in keybindings.json. Users could wire it to whatever key they want without needing a new UI element

The keybinding action is probably the fastest path to ship something. The bindings registry is already there — it just needs the action. Power users would configure it immediately and it doesn't require any rendering changes.

Hit this constantly when pulling responses into docs, slides, and Slack.

chrisjunlee · 5 months ago

My first week of using claude, and this is one of the easy QoL features I wish you guys had.

Andy8647 · 4 months ago

+1. One angle not yet raised: Claude Code's copy-on-select overrides the terminal's own setting. My Ghostty has copy-on-select = false explicitly configured, but selecting inside Claude Code still writes to the clipboard via OSC 52. A user who has already expressed their preference via terminal config is being silently overridden — at minimum the TUI should defer to the terminal, or expose an opt-out setting.

roysupriyo10figr · 3 months ago

i very much agree with @Andy8647 , there should be an opt out setting at the very least, either through an environment variable or maybe follow the terminal preference

github-actions[bot] · 2 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

agibralter · 1 month ago

This seems to have been implemented in a recent release, no?

a692570 · 1 month ago

yup seems to be working well

agibralter · 1 month ago

But it's missing a configuration option to turn it on/off...

wanderingstan · 1 month ago

This is now implemented and I hate it. And claude doesn't seem to know it exists. PLEASE LET US TURN THIS OFF!
This exists as a feature within terminal apps, which is where this level of preference belongs.