[BUG] /copy command triggers an API round-trip
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
- Start a new Claude Code session
- Send any trivial prompt, e.g.
hello - Wait for the response (e.g. "Hello! How can I help you today?")
- 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-copyworks instantly. - Only
wl-copyis installed (noxclip/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(fromwl-clipboard);xclipis not installed
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗