[BUG] TUI extracts slash command pattern from pasted text and displays it as user input
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?
When a user pastes text containing a /command-name pattern, the TUI extracts just the slash command portion and displays it as the user's input, ignoring all surrounding content.
For example, if I paste:
````
❯ /my-skill
● Hello...
some more content
````
The TUI displays only:
❯ /my-skill
It strips:
- The code fence markers (```)
- The shell prompt (
❯) - Everything after the slash command name
What Should Happen?
The TUI should display the actual user input, not extract and display a slash command pattern found within the text.
Error Messages/Logs
Steps to Reproduce
- Copy text containing
/some-skillsomewhere in it (e.g., wrapped in a code block) - Paste it into Claude Code
- Observe: TUI displays only
/some-skillas if you invoked a slash command
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.25
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
The transcript correctly records the full pasted content—Claude receives everything correctly. This is purely a TUI display bug, but it's confusing because the display looks like a slash command was invoked.
---
✍️ Author: Claude Code (Dev Container) with @carrotRakko
Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗