[BUG] Copying text (Ctrl+C) from Claude Code window in VS Code fails
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
While using Claude Code in VS Code, copying text (Ctrl+C) from a Claude Code window in VS Code no longer works. Right-click > Copy copies no text to the clipboard. This is true in the main window and the prompt textbox. I can type a prompt but I cannot copy (or cut) the text I have typed.
Attempted focus changes, starting a new Claude Code session, etc, do not help. Ctrl+V (Paste) works correctly.
Restarting VS Code resolved the problem (for now), but this was highly disruptive in the middle of a complex session.
VS Code v1.114.0 OS: Windows_NT x64 10.0.19045 (Windows 10 Pro)
What Should Happen?
Ctrl+C (and context menu equivalent) should work correctly from the main Claude Code window and the prompt textbox. Ctrl+X and Ctrl+P should also work in the prompt textbox.
Error Messages/Logs
Steps to Reproduce
No reliable reproduction steps known. Restarting VS Code resolved the problem, but this was highly disruptive.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.1.92
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
No response
Confirming this is still happening on macOS with Claude Code extension 2.1.128 (also reproduced on 2.1.126 and 2.1.123). VS Code 1.118.1 on macOS 15.4 (Darwin 25.4.0), Apple Silicon.
Behavior matches the original report:
- Cmd+C from the Claude Code panel and the prompt textbox does nothing
- Right-click → Copy also fails
- Cmd+V paste works fine
- Restarting VS Code resolves it temporarily
So this isn't Windows-specific and it's persisted across at least the last several extension releases. Happy to provide more detail if useful.
Same here, VSCode Version: 1.119.0, Claude extension 2.1.138, macOS Tahoe 26.4.1 (Darwin 25.4.0), Apple Silicon
Different methods: Hover the message ❌ does not show anything Right-click and copy ❌ does not copy anything Cmd + C ❌ NOPE Switch to terminal ❌ no f... way Updating VSCode ❌ (at latest version)
I'm getting really mad at this issue
Same here. I cannot copy-paste what Claude said to me because of this issue, but basically text selection is disabled in the extension's web view in favour of links (e.g clicks on file references). I don't know if this is true, since I can select the text.
I am also getting completely mad at this issue.
@bcherny think you can have claude check this out, prettyplease 🙏
Similar issue on my end, only that I cannot select an arbitrary block of text if I run CC from a VSC terminal in pop-up window mode, I can only select by double clicking a single word or triple-clicking a single line. Once some text is selected by double/triple clicking, Command-C works fine. Selecting from a VSCode terminal window (not in a tab in the main VSCode window) works fine. Selecting from a CC console in a tab in the main VSCode window works fine.
confirm same issue - copy form claude code output chat to anything results in artifacts of the UI not the content selected. No copy button of response and no /copy works anymore. What is going on?
NOTE: The only way I was able to restore select - copy - paste normally is a full ctl=shft=p Developer: Reload Window and then I am able to use copy paste again for a while.
Same issue on windows Just installed today
same issue Copy, Paste and Select All do not work from either keyboard shortcuts or mouse context menu Claude extension v 2.1.160 Mac OS Tahoe 26.4.1
Still reproduces on Claude Code 2.1.177
Selecting plain prose text from an assistant answer in the VSCode extension side panel and pressing Ctrl+C does not copy it to the clipboard. Click-drag selection either highlights nothing or the copy is silently dropped. What works: the copy button on rendered code/command blocks. What's broken: selecting and copying normal message/prose text.
Workaround: Reloading the window restores prose copy — Ctrl+Shift+P → "Developer: Reload Window". After a reload, selecting and copying text works again, so the broken state appears to set in during a session rather than being permanent.
Environment:
- Claude Code extension: 2.1.177
- Editor: VSCode 1.111.0 (native extension, side panel)
- OS: Linux (kernel 6.8.0)
Tried: updating to latest, reloading the window, Alt-drag to force raw selection. Reload Window is the only thing that restores copy.
Still producing the same error in Claude Extension version 2.1.183, running VS Code Version: 1.125.1
The issue still persists.
Environment:
- VS Code: 1.126.0
- Claude Code Extension: 2.1.195
My workaround:
Add this to your keybindings.json:
{
"key": "cmd+c",
"command": "editor.action.clipboardCopyAction",
"when": "editorTextFocus || terminalFocus || view == workbench.panel.output"
}
Then select the text, right-click once, then cmd/ctrl+c — same as usual, just one extra right-click, no need to reload the window.
The issue still persists.
Environment:
* VS Code: 1.126.0 * Claude Code Extension: 2.1.195My workaround:
Add this to your
keybindings.json:{ "key": "cmd+c", "command": "editor.action.clipboardCopyAction", "when": "editorTextFocus || terminalFocus || view == workbench.panel.output" }
Then select the text, right-click once, then
cmd/ctrl+c— same as usual, just one extra right-click, no need to reload the window.
Issue still present but your keybinding works:)
Confirming on Linux (X11) as well — so this reproduces on all three platforms now.
Environment:
- Ubuntu (kernel 6.8, X11 session — not Wayland)
- VS Code 1.126.0 (native .deb install, not snap/flatpak)
- Claude Code extension 2.1.204
Symptom matches the other reports: selecting text in the chat panel and using right-click → Copy or Ctrl+C silently fails — the clipboard keeps its previous content. Paste works fine. The copy button on code blocks works.
Possible root cause — I dug into it via DevTools (Developer: Toggle Developer Tools), and the modern async Clipboard API is being denied in the renderer, while the legacy path works:
// with the document focused (deferred via setTimeout + clicking back into the window):
navigator.clipboard.writeText("test")
// → NotAllowedError: Failed to execute 'writeText' on 'Clipboard': Write permission denied.
// legacy fallback:
const ta = document.createElement('textarea');
ta.value = 'test'; document.body.appendChild(ta); ta.select();
document.execCommand('copy'); // → true, and the text actually reaches the system clipboard
ta.remove();
So the system clipboard itself is healthy — clipboard-write permission is being denied for navigator.clipboard in this context, and the copy fails silently because there's no fallback. Falling back to document.execCommand('copy') (or routing copy through the extension host) when writeText rejects would likely fix this on all platforms.
I've been seeing this lack of behaviour on latest releases for the last few weeks. It's infuriating - I type something, can't re-use it elsewhere; I ask for markdown to copy/paste out, I'm unable to do anything but screenshot for OCR. (or burn more tokens regenerating the content - not exactly - in a subsequent turn)
I was able to isolate the mouse selection / copy issue to the fullscreen TUI setting.
The issue occurs when this exists in ~/.claude/settings.json:
{
"tui": "fullscreen"
}
Environment tested:
SHELL=/bin/bash
TERM=xterm-256color
Connection=SSH
OS=Ubuntu and AlmaLinux
Symptoms:
- Mouse text selection does not work reliably inside Claude Code.
- Copying selected terminal text fails or becomes inconsistent.
- The same SSH client and terminal work normally outside Claude Code.
I tested this on both Ubuntu and AlmaLinux servers. After removing only "tui": "fullscreen" from ~/.claude/settings.json and restarting Claude Code, mouse selection/copy worked normally on both systems.
Workaround:
python3 - <<'PY'
import json, pathlib
p = pathlib.Path.home() / ".claude" / "settings.json"
data = {}
if p.exists():
try:
data = json.loads(p.read_text())
except Exception:
data = {}
data.pop("tui", None)
p.parent.mkdir(parents=True, exist_ok=True)
p.write_text(json.dumps(data, indent=2) + "\n")
print(p.read_text())
PY
I also confirmed the behavior by restoring the old config with "tui": "fullscreen"; the issue returned immediately. Removing it fixed the issue again.
This appears to be related to fullscreen TUI mode capturing or altering terminal mouse/input behavior in SSH sessions.
Same issue on Wondows today when the VSCode window is overloaded (multiple claude code instances and heavy RAM usage)
Same issue on Windows, VS Code version 1.142.0-insider edition, Claude Code extension v2.1.296.
Another data point + a workaround that worked for me.
Setup: VS Code Web (code serve-web) running on a Linux HPC node, opened in Chrome; Claude Code CLI (2.1.296) in the integrated terminal. Clipboard works everywhere else (other terminal windows, tmux), but not when selecting text in Claude Code. Shift/Option-drag to force native selection did not help either.
Fix: turning off the fullscreen (no-flicker) renderer restored copying, and scrolling still works:
CLAUDE_CODE_NO_FLICKER=0 claude
To make it permanent, in ~/.claude/settings.json:
{ "env": { "CLAUDE_CODE_NO_FLICKER": "0" } }
CLAUDE_CODE_DISABLE_MOUSE=1 also fixed copying, but it disables mouse scrolling in the UI, so it's a worse trade-off.
So at least in the terminal/CLI case the cause looks like the fullscreen renderer's mouse tracking (selection + copy handled by Claude instead of the terminal), not the browser clipboard permission.
I had this issue too, which was resolved with updating the Claude extension and restarting VSCode - for now.
Still happening on Windows. Windows 11 Home 26H2 (build 26300.9711), VS Code 1.144.0, Claude Code extension 2.1.126.
Ctrl+C and right-click > Copy fail in the Claude Code panel. Paste works.
Workaround that fixes copy in both the panel and the terminal: add this to keybindings.json
{ "key": "ctrl+c", "command": "editor.action.clipboardCopyAction", "when": "editorTextFocus || view == workbench.panel.output" }
