[BUG] Text from OneNote (any rich text editor) is converted into [Image #1]
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.98 (Claude Code)
- Operating System: macOS 15.6.1 (24G90)
- Terminal: iTerm2
Bug Description
When I copy text from OneNote, and paste it into the iTerm2 Claude CLI version specified above, the text I pasted is shown correctly, but almost instantly it is converted into an image. It should stay as text and not converted into an image.
Steps to Reproduce
- Open OneNote or any other rich text editor.
- Select any text and copy it (which goes into the clipboard).
- Paste it into the iTerm2 Claude CLI and see how the text is transformed into an image.
Expected Behavior
Leave it as text.
Actual Behavior
It got converted into an image.
Additional Context
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/5051
- https://github.com/anthropics/claude-code/issues/5496
- https://github.com/anthropics/claude-code/issues/4705
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This is not a duplicate of any of those 3 issues.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still reproducible on macOS Sequoia (Darwin 24.6.0) with Claude Code CLI.
Additional reproduction case: Copy a file from Finder (Cmd+C), paste into Claude Code. Only the file icon image appears; the filename text and file-url are lost.
Technical analysis: macOS clipboard contains multiple formats simultaneously:
public.file-url→ full file pathpublic.utf8-plain-text→ filename onlypublic.tiff/com.apple.icns→ file icon image
Claude Code appears to prioritize image formats over text formats when both are present.
Suggested fix: When clipboard contains public.file-url, extract the path as text rather than using the image representation.