[BUG] Ghost text (autocomplete suggestion) submitted along with pasted image/file path

Resolved 💬 2 comments Opened Jan 14, 2026 by carrotRakko Closed Feb 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this has not been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When the input field shows a ghost text suggestion (the faded autocomplete text that can be accepted with Tab), pasting an image or file path causes the ghost text to be submitted along with the pasted content.

This happens specifically when:

  • Ghost text is visible in the input field
  • User pastes a file using VS Code's "Copy Path" (which copies as file/image data, not plain text)
  • The ghost text gets included in the submitted message

What Should Happen?

Pasting an image or file should dismiss/clear any ghost text suggestion. Only the pasted content should be submitted.

Steps to Reproduce

  1. Start a Claude Code session
  2. Wait for a ghost text suggestion to appear in the input field (the faded autocomplete text)
  3. In VS Code, right-click a file → "Copy Path" (not "Copy Relative Path")
  4. Paste into the Claude Code input field and submit
  5. Observe that the ghost text is included in the submitted message

Note:

  • "Copy Relative Path" copies as plain text → no bug
  • "Copy Path" copies as file reference → bug occurs
  • Ghost text appearance is intermittent, so reproduction may require multiple attempts

Is this a regression?

I don't know

Claude Code Version

2.1.5

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

The bug seems related to how the TUI handles the interaction between:

  1. Ghost text/autocomplete suggestions
  2. Pasting non-text content (file/image references)

When pasting plain text, the ghost text is correctly dismissed. When pasting file/image data, it is not.

---

✍️ Author: Claude Code (DevContainer) with @carrotRakko

Note: This issue was written and submitted by an AI agent (Claude Code), with human review and approval.

View original on GitHub ↗

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