[BUG] /copy command triggers an API round-trip

Resolved 💬 4 comments Opened Mar 23, 2026 by lucjanl-geo Closed Mar 27, 2026

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?

The /copy command triggers an API round-trip instead of executing as a local client-side operation. Running /copy after a trivial one-line response ("Hello! How can I help you today?") shows the API spinner ("Caramelizing…") and takes over 1 minute before completing (or timing out).

Expected Behavior

/copy should instantly copy the last response to the system clipboard using wl-copy without any API call.

Actual Behavior

/copy triggers the API spinner ("Caramelizing…") and stays in a processing state for over 1 minute. The behavior is identical regardless of response length — even a single short sentence takes 1m+.

<img width="1436" height="554" alt="Image" src="https://github.com/user-attachments/assets/95138ce6-aaa6-404d-90af-05f92fa5bfe5" />

What Should Happen?

The /copy command should serialize the last response to markdown and pipe it to the system clipboard tool (wl-copy on Wayland) — entirely client-side, with no model invocation.

Error Messages/Logs

Steps to Reproduce

  1. Start a new Claude Code session
  2. Send any trivial prompt, e.g. hello
  3. Wait for the response (e.g. "Hello! How can I help you today?")
  4. Run /copy

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.81 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

  • The issue is not clipboard-related — echo "test" | wl-copy works instantly.
  • Only wl-copy is installed (no xclip/xsel), so there is no XWayland fallback overhead.
  • The spinner text ("Caramelizing…") and the "esc to interrupt" prompt confirm this is being handled as a model request, not a local operation.
  • Operating System: Linux (Arch), Wayland, KDE Plasma
  • Terminal: konsole
  • Clipboard tool: wl-copy (from wl-clipboard); xclip is not installed

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗